Commit Graph

16514 Commits

Author SHA1 Message Date
James Molloy
296815dcce Add support for ARM segment types PT_ARM_ARCHEXT, PT_ARM_EXIDX and PT_ARM_UNWIND.
Patch by Pete Chou!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167109 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-31 09:10:56 +00:00
Rafael Espindola
52d053238a xlc supports __attribute__((aligned(x))), use it.
Patch by Kai.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167087 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-31 00:54:26 +00:00
Rafael Espindola
3a9b71434c Add extra declarations of hash_value needed to build llvm with xlc 12.1.
Patch by Kai!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167085 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-31 00:46:18 +00:00
Chad Rosier
daeec8fad3 [inline asm] Get the mayLoad/mayStore directly from the MIOp_ExtraInfo operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167050 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-30 20:39:19 +00:00
Chad Rosier
3d71688476 [inline asm] Implement mayLoad and mayStore for inline assembly. In general,
the MachineInstr MayLoad/MayLoad flags are based on the tablegen implementation.
For inline assembly, however, we need to compute these based on the constraints.

Revert r166929 as this is no longer needed, but leave the test case in place. 
rdar://12033048 and PR13504

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167040 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-30 19:11:54 +00:00
Quentin Colombet
9a419f656e Change ForceSizeOpt attribute into MinSize attribute
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167020 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-30 16:32:52 +00:00
Duncan Sands
446cf94cdb Fix isEliminableCastPair to work correctly in the presence of pointers
with different sizes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167018 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-30 16:03:32 +00:00
Duncan Sands
7adfe3fd60 Add a helper for telling whether a type is a pointer or vector of pointer type.
Simplify the implementation of the corresponding integer and float functions and
move them inline while there.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167014 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-30 13:38:54 +00:00
Hans Wennborg
04d7d13d30 Use TargetTransformInfo to control switch-to-lookup table transformation
When the switch-to-lookup tables transform landed in SimplifyCFG, it
was pointed out that this could be inappropriate for some targets.
Since there was no way at the time for the pass to know anything about
the target, an awkward reverse-transform was added in CodeGenPrepare
that turned lookup tables back into switches for some targets.

This patch uses the new TargetTransformInfo to determine if a
switch should be transformed, and removes
CodeGenPrepare::ConvertLoadToSwitch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167011 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-30 11:23:25 +00:00
Sid Manning
8ceffeb95c * Add e_flags enum for Hexagon
* Add Hexagon specific section indexes for small data
- Reviewed by Michael Spencer


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166997 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-30 02:26:15 +00:00
Ulrich Weigand
e669c930a6 In various places throughout the code generator, there were special
checks to avoid performing compile-time arithmetic on PPCDoubleDouble.

Now that APFloat supports arithmetic on PPCDoubleDouble, those checks
are no longer needed, and we can treat the type like any other.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166958 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-29 18:35:49 +00:00
Ulrich Weigand
fce241d76f APFloat cleanup: Remove now unused fields "sign2" and "exponent2".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166952 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-29 18:17:42 +00:00
Nadav Rotem
2459bf2427 Rename the BB-vectorize flag to match the dragonegg name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166948 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-29 18:01:14 +00:00
Duncan Sands
7ed4f94c13 Remove a wrapper around getIntPtrType added to GVN by Hal in commit 166624 (the
wrapper returns a vector of integers when passed a vector of pointers) by having
getIntPtrType itself return a vector of integers in this case.  Outside of this
wrapper, I didn't find anywhere in the codebase that was relying on the old
behaviour for vectors of pointers, so give this a whirl through the buildbots.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166939 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-29 17:31:46 +00:00
Bob Wilson
6a09098cca Remove code to saturate profile counts.
We may need to change the way profile counter values are stored, but
saturation is the wrong thing to do.  Just remove it for now.

Patch by Alastair Murray!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166938 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-29 17:27:39 +00:00
Nadav Rotem
d233b78760 Change the PassManagerBuilder (used by -O3) loop vectorizer flag from -vectorize to -vectorize-loops because we dont want to share the same flag as the bb-vectorizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166937 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-29 16:36:25 +00:00
Hans Wennborg
b9051db24a Minor style fixes for TargetTransformationInfo and TargetTransformImpl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166936 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-29 16:26:52 +00:00
NAKAMURA Takumi
45770dab36 llvm/Config/config.h.cmake: Good bye, Kevin! We won't honor authors in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166934 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-29 16:07:28 +00:00
Duncan Sands
2c7b44592f Rather than duplicating the getPointerSize code just call getPointerSize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166923 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-29 12:19:04 +00:00
Tim Northover
a41dce3c64 Add interface for querying object files for symbol values.
Currently only implemented for ELF.

Patch by Amara Emerson.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166918 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-29 10:47:00 +00:00
Evgeniy Stepanov
976f770e2d va_start, va_end, va_copy: InstrinsicInst subclasses and InstVisitor support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166916 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-29 09:39:03 +00:00
Rafael Espindola
0d91c0b519 Remove TargetELFWriterInfo.
All the credit goes to Jan Voung for noticing it was dead!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166902 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-28 21:34:43 +00:00
Nadav Rotem
f065a84677 1. Fix a bug in getTypeConversion. When a *simple* type is split, we need to return the type of the split result.
2. Change the maximum vectorization width from 4 to 8.
3. A test for both.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166864 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-27 04:11:32 +00:00
Nadav Rotem
a5a3a61c5f Refactor the VectorTargetTransformInfo interface.
Add getCostXXX calls for different families of opcodes, such as casts, arithmetic, cmp, etc.

Port the LoopVectorizer to the new API.

The LoopVectorizer now finds instructions which will remain uniform after vectorization. It uses this information when calculating the cost of these instructions.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166836 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 23:49:28 +00:00
Lang Hames
f29c05e883 MCRegisterClass should be returned by const ref, not by value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166822 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 22:14:10 +00:00
Jakob Stoklund Olesen
f4a5a613fa Remove the canCombineSubRegIndices() target hook.
The new coalescer can already do all of this, so there is no need to
duplicate the efforts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166813 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 20:38:19 +00:00
Benjamin Kramer
b8b3f6081f Remove LoopDependenceAnalysis.
It was unmaintained and not much more than a stub. The new DependenceAnalysis
pass is both more general and complete.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166810 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 20:25:01 +00:00
Bill Wendling
480b1b28ea Remove the unneeded initializers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166804 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 19:52:54 +00:00
Derek Schuff
b61054ff8f Stop APInt::shl from generating llvm.trap
APInt::shl generated llvm.trap to guard against shifts greater than bit-width.
This was already checked with an assert, and there was a special case for
shifts equal to bit-width. Modify this check to catch shifts greater than or
equal to bit-width, so llvm.trap isn't generated.

Patch contributed by JF Bastien

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166803 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 19:52:27 +00:00
Rafael Espindola
e5551ed9ce Change the internalize pass to internalize all symbols when given an empty
list of externals. This makes sense since a shared library with no symbols
can still be useful if it has static constructors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166795 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 18:47:48 +00:00
Chad Rosier
efcb3d9c1c [ms-inline asm] Add support for the TYPE operator.
Part of rdar://12576868


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166790 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 18:04:20 +00:00
Benjamin Kramer
ff18310274 Add a basic verifier for SCEV's backedge taken counts.
Enabled with -verify-scev. This could be extended significantly but hopefully
catches the common cases now. Note that it's not enabled by default in any
configuration because the way it tries to distinguish SCEVs is still fragile and
may produce false positives. Also the test-suite isn't clean yet, one example
is that it fails if a pass drops an NSW bit but it's still present in SCEV's
cached. Cleaning up all those cases will take some time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166786 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 17:31:32 +00:00
Nicolas Geoffray
0bd10f2af3 Remove GC roots that reference dead objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166763 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 09:15:55 +00:00
Bill Wendling
f098be4f86 Alphabetize the enum list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166760 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 07:08:58 +00:00
Hal Finkel
102a7c088c Add VectorTargetTransform::getNumberOfParts.
As discussed on IRC, add VectorTargetTransform::getNumberOfParts
to provide a stable interface to the vector legalization splitting factor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166751 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 04:28:02 +00:00
Kaelyn Uhrain
12413ae7cb Fix anonymous namespace issue introduced by r166714:
include/llvm/MC/MCTargetAsmParser.h:46:8: error: 'llvm::ParseInstructionInfo' has a field 'llvm::ParseInstructionInfo::AsmRewrites' whose type uses the anonymous namespace [-Werror]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166729 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 22:09:49 +00:00
Chad Rosier
ec13022c39 [ms-inline asm] Perform field lookups with the dot operator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166724 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 21:51:10 +00:00
Chad Rosier
6a020a7117 [ms-inline asm] Add support for creating AsmRewrites in the target specific
AsmParser logic.  To be used/tested in a subsequent commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166714 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 20:41:34 +00:00
Joerg Sonnenberger
61131ab15f Remove exception handling usage from tblgen.
Most places can use PrintFatalError as the unwinding mechanism was not
used for anything other than printing the error. The single exception
was CodeGenDAGPatterns.cpp, where intermediate errors during type
resolution were ignored to simplify incremental platform development.
This use is replaced by an error flag in TreePattern and bailout earlier
in various places if it is set. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166712 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 20:33:17 +00:00
Michael Liao
ed2507a9da Add 'const' qualifier on member functions not changing its fields.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166708 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 18:35:04 +00:00
Joerg Sonnenberger
0eafc7fc37 In preparation for removing exception handling in tablegen, add
PrintFatalError, which combines PrintError with exit(1).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166690 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 16:35:18 +00:00
Benjamin Kramer
8e4e007409 DependenceAnalysis: Push #includes down into the implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166688 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 16:15:22 +00:00
Sebastian Pop
becdf4d7cd add TableGen support to create relationship maps between instructions
Relationship maps are represented as InstrMapping records which are parsed by
TableGen and the information is used to construct mapping tables to represent
appropriate relations between instructions. These tables are emitted into
XXXGenInstrInfo.inc file along with the functions to query them.

Patch by Jyotsna Verma <jverma@codeaurora.org>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166685 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 15:54:06 +00:00
Adhemerval Zanella
aa71428378 Initial TOC support for PowerPC64 object creation
This patch adds initial PPC64 TOC MC object creation using the small mcmodel
(a single 64K TOC) adding the some TOC relocations (R_PPC64_TOC,
R_PPC64_TOC16, and R_PPC64_TOC16DS).

The addition of 'undefinedExplicitRelSym' hook on 'MCELFObjectTargetWriter'
is meant to avoid the creation of an unreferenced ".TOC." symbol (used in
the .odp creation) as well to set the R_PPC64_TOC relocation target as the
temporary ".TOC." symbol. On PPC64 ABI, the R_PPC64_TOC relocation should
not point to any symbol.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166677 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 12:27:42 +00:00
Nadav Rotem
2652c50f74 Implement a basic cost model for vector and scalar instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166642 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 23:47:38 +00:00
Nadav Rotem
4332bdcb5f Make LegalizeKind public so that we can use it outside of TargetLowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166623 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 20:59:17 +00:00
Kaelyn Uhrain
99abc17832 Make ~Operator() protected so subclasses can inherit it and not have
a bunch of errors for all the Operator subclasses such as:

include/llvm/Operator.h:76:7: error: deleted function 'virtual llvm::OverflowingBinaryOperator::~OverflowingBinaryOperator()'
include/llvm/Operator.h:43:3: error: overriding non-deleted function 'virtual llvm::Operator::~Operator()'
include/llvm/Operator.h:76:7: error: 'virtual llvm::OverflowingBinaryOperator::~OverflowingBinaryOperator()' is implicitly deleted because the default definition would be ill-formed:
include/llvm/Operator.h:43:3: error: 'virtual llvm::Operator::~Operator()' is private
include/llvm/Operator.h:76:7: error: within this context

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166611 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 19:17:42 +00:00
Pete Cooper
99112c6b19 Improve DenseMap checks for power of 2 growth. Thanks for the tip Jakob
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166609 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 18:50:44 +00:00
Micah Villmow
b52fb87617 Add some cleanup to the DataLayout changes requested by Chandler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166607 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 18:36:13 +00:00
Micah Villmow
b8bce928f4 Back out r166591, not sure why this made it through since I cancelled the command. Bleh, sorry about this!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166596 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 17:25:11 +00:00