Add ability to disable building LLVM utils

Patch by Chris Bieneman


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205478 91177308-0d34-0410-b5e6-96231b3b80d8
Fix a nomenclature error in llvm-nm.

What llvm-nm prints depends on the file format. On ELF for example, if the
file is relocatable, it prints offsets. If it is not, it prints addresses.
Since it doesn't really need to care what it is that it is printing, use the
generic term value.

Fix or implement getSymbolValue to keep llvm-nm working.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205479 91177308-0d34-0410-b5e6-96231b3b80d8
[CodeGen] Teach the peephole optimizer to remember (and exploit) all folding
opportunities in the current basic block, rather than just the last one seen.

<rdar://problem/16478629>



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205481 91177308-0d34-0410-b5e6-96231b3b80d8
ARM Linux support

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205483 91177308-0d34-0410-b5e6-96231b3b80d8
Add test case for [Constant Hoisting] Erase dead cast instructions (r204538).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205484 91177308-0d34-0410-b5e6-96231b3b80d8
Fix multi-register costs in BasicTTI::getCastInstrCost

For an cast (extension, etc.), the currently logic predicts a low cost if the
associated operation (keyed on the destination type) is legal (or promoted).
This is not true when the number of values required to legalize the type is
changing. For example, <8 x i16> being sign extended by <8 x i32> is not
generically cheap on PPC with VSX, even though sign extension to v4i32 is
legal, because two output v4i32 values are required compared to the single
v8i16 input value, and without custom logic in the target, this conversion will
scalarize.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205487 91177308-0d34-0410-b5e6-96231b3b80d8
[X86] As per suggestion from Craig Topper and Hal Finkel, override
TargetInstrInfo::findCommutedOpIndices to enable VFMA*231 commutation, rather
than abusing commuteInstruction.

Thanks very much for the suggestion guys!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205489 91177308-0d34-0410-b5e6-96231b3b80d8
Fix test case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205492 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "Fix a nomenclature error in llvm-nm."

This reverts commit r205479.

It turns out that nm does use addresses, it is just that every reasonable
relocatable ELF object has sections with address 0. I have no idea if those
exist in reality, but it at least it shows that llvm-nm should use the name
address.

The added test was includes an unusual .o file with non 0 section addresses. I
created it by hacking ELFObjectWriter.cpp.

Really sorry for the churn.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205493 91177308-0d34-0410-b5e6-96231b3b80d8
Account for scalarization costs in BasicTTI::getMemoryOpCost for extending vector loads

When a vector type legalizes to a larger vector type, and the target does not
support the associated extending load (or truncating store), then legalization
will scalarize the load (or store) resulting in an associated scalarization
cost.  BasicTTI::getMemoryOpCost needs to account for this.

Between this, and r205487, PowerPC on the P7 with VSX enabled shows:

MultiSource/Benchmarks/PAQ8p/paq8p: 43% speedup
SingleSource/Benchmarks/BenchmarkGame/puzzle: 51% speedup
SingleSource/UnitTests/Vectorizer/gcc-loops 28% speedup

(some of these are new; some of these, such as PAQ8p, just reverse regressions
that VSX support would trigger)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205495 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "[Constant Hoisting] Lazily compute the idom and cache the result."

This code is no longer usefull, because we only compute and use the
IDom once. There is no benefit in caching it anymore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205498 91177308-0d34-0410-b5e6-96231b3b80d8
Simplify ELFObjectFile<ELFT>::getSymbolAddress.

In particular, we only need to fetch the section if this is a relocatable
object.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205499 91177308-0d34-0410-b5e6-96231b3b80d8
Only clear the thumb bit from function addresses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205500 91177308-0d34-0410-b5e6-96231b3b80d8
Add support for the R_ARM_ABS32 relocation.

This should bring the arm buildbots back.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205502 91177308-0d34-0410-b5e6-96231b3b80d8
Remove getSymbolValue.

All existing users explicitly ask for an address or a file offset.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205503 91177308-0d34-0410-b5e6-96231b3b80d8
Implement get getSymbolFileOffset with getSymbolAddress.

This has the following advantages:
* Less code.
* The old ELF implementation was wrong for non-relocatable objects.
* The old ELF implementation (and I think MachO) was wrong for thumb.

No current testcase since this is only used from MCJIT and it only uses
relocatable objects and I don't think it supports thumb yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205508 91177308-0d34-0410-b5e6-96231b3b80d8
Handle getting UnknownAddressOrSize or section_end().

These should probably be error conditions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205509 91177308-0d34-0410-b5e6-96231b3b80d8
[CodeGen] Fix peephole optimizer bug introduced in r205481. Fixes PR19318.

I should have read that comment a little more carefully. ;)

Regression test in the works, committing in the mean time to un-break people.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205511 91177308-0d34-0410-b5e6-96231b3b80d8
DebugInfo: Use a 64 bit type for the subrange

While we were encoding 64 bit values (data8) in the subrange itself,
using a 32 bit type for the subrange was still confusing the gdb. Oh,
and make it unsigned too.

As the comment points out, this could be pushed into the frontend so
that it would be 32 or 64 bit as appropriate, etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205512 91177308-0d34-0410-b5e6-96231b3b80d8
Minor update to the stack map documentation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205513 91177308-0d34-0410-b5e6-96231b3b80d8