1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
Commit Graph

33109 Commits

Author SHA1 Message Date
Jeffrey Yasskin
7ed6722fc4 Fix OProfileJITEventListener after r84054 renamed CompileUnit to Scope.
llvm-svn: 84895
2009-10-22 20:57:35 +00:00
Bill Wendling
c6d3a6ed66 Tidying up some code and comments. No functionality change.
llvm-svn: 84894
2009-10-22 20:48:59 +00:00
Devang Patel
5c461d6dcd Hide MetadataContext implementation details.
llvm-svn: 84886
2009-10-22 19:36:54 +00:00
Devang Patel
2a0e2f1794 Fix getMDs() interface such that it does not expose implementation details.
llvm-svn: 84885
2009-10-22 18:55:16 +00:00
Devang Patel
1fa3e26912 Using TrackingVH instead of WeakVH or WeakMetadataVH.
llvm-svn: 84884
2009-10-22 18:25:28 +00:00
Devang Patel
944cbf7647 Sort handler names to ensure deterministic behavior.
llvm-svn: 84878
2009-10-22 17:40:37 +00:00
Bob Wilson
8f4f73da55 Revert 84843. Evan, this was breaking some of the if-conversion tests.
llvm-svn: 84868
2009-10-22 16:52:21 +00:00
Nicolas Geoffray
7955fa8d35 Verify that the function and exception table have been allocated
before freeing them.

llvm-svn: 84859
2009-10-22 14:35:57 +00:00
Benjamin Kramer
b159c164d2 Shift art to the right to keep GCC from complaining about multi-line comments.
llvm-svn: 84849
2009-10-22 09:28:49 +00:00
Evan Cheng
2edd1efa46 Move if-conversion before post-regalloc scheduling so the predicated instruction get scheduled properly.
llvm-svn: 84843
2009-10-22 06:48:32 +00:00
Evan Cheng
d411ac1267 Load / store multiple was missing opportunites when the load / store bundles are at the end of the bb. Test case is already in, the bug is exposed by subsequent commit.
llvm-svn: 84842
2009-10-22 06:47:35 +00:00
Chris Lattner
cd80b1711b move another load optimization from instcombine -> libanalysis.
llvm-svn: 84841
2009-10-22 06:44:07 +00:00
Chris Lattner
3fb4c19b7d move 'loading i32 from string' optimization from instcombine
to libanalysis.  Instcombine shrinking... does this even 
make sense???

llvm-svn: 84840
2009-10-22 06:38:35 +00:00
Chris Lattner
2c8c8533b1 Move some constant folding logic for loads out of instcombine into
Analysis/ConstantFolding.cpp.  This doesn't change the behavior of
instcombine but makes other clients of ConstantFoldInstruction
able to handle loads.  This was partially extracted from Eli's patch
in PR3152.

llvm-svn: 84836
2009-10-22 06:25:11 +00:00
Evan Cheng
0c6aa52214 Trim more includes.
llvm-svn: 84832
2009-10-22 05:11:00 +00:00
Evan Cheng
166f455456 Trim include.
llvm-svn: 84831
2009-10-22 05:08:49 +00:00
Chris Lattner
e0932e92e9 fix warning.
llvm-svn: 84826
2009-10-22 03:42:27 +00:00
Devang Patel
6df2865e24 Fix getHandlerNames() interface. Now it populate clinet supplied small vector with handler names.
llvm-svn: 84820
2009-10-22 01:01:24 +00:00
Evan Cheng
8fdd1661fa Don't generate sbfx / ubfx with negative lsb field. Patch by David Conrad.
llvm-svn: 84813
2009-10-22 00:40:00 +00:00
Devang Patel
125861a48c Use StringRef to construct MDString.
llvm-svn: 84811
2009-10-22 00:22:05 +00:00
Chris Lattner
7c507ae857 fix PR5262.
llvm-svn: 84810
2009-10-22 00:17:26 +00:00
Anton Korobeynikov
bbc637e96d Use special DAG-to-DAG preprocessing to allow mem-mem instructions to be selected.
Yay for ASCII graphics!

llvm-svn: 84808
2009-10-22 00:16:00 +00:00
Anton Korobeynikov
726b132e13 Fix null pointer dereference.
llvm-svn: 84806
2009-10-22 00:15:17 +00:00
Devang Patel
068e5420ce Remove meaningless const.
Pass StringRef by value.

llvm-svn: 84804
2009-10-22 00:10:15 +00:00
Dan Gohman
2d8e5654a8 Revert the main portion of r31856. It was causing BranchFolding
to break up CFG diamonds by banishing one of the blocks to the end of
the function, which is bad for code density and branch size.

This does pessimize MultiSource/Benchmarks/Ptrdist/yacr2, the
benchmark cited as the reason for the change, however I've examined
the code and it looks more like a case of gaming a particular
branch than of being generally applicable.

llvm-svn: 84803
2009-10-22 00:03:58 +00:00
Devang Patel
f9d56f4830 Derive metadata hierarchy from Value instead of User.
llvm-svn: 84801
2009-10-21 23:57:35 +00:00
Chris Lattner
bf5a89d82b revert r84754, it isn't the right approach. Edwin, please propose
patches for fixes like this instead of committing them directly.

llvm-svn: 84799
2009-10-21 23:41:58 +00:00
Jim Grosbach
f79f9afb91 Missing piece of the ARM frame index post-scavenging conditionalization
llvm-svn: 84798
2009-10-21 23:40:56 +00:00
Benjamin Kramer
1af3b8ca4d Fix thinko noticed by Chris.
llvm-svn: 84797
2009-10-21 23:29:32 +00:00
Dale Johannesen
2bb120a97f Rename msasm to alignstack per review.
llvm-svn: 84795
2009-10-21 23:28:00 +00:00
Benjamin Kramer
87ca5b37b6 Remove pointless return; at end of function.
llvm-svn: 84794
2009-10-21 23:27:54 +00:00
Jim Grosbach
3ae825eccf The spill restore needs to be resolved to the SP/FP just like the spill
llvm-svn: 84792
2009-10-21 22:59:56 +00:00
Jim Grosbach
363a67d9c5 Conditionalize ARM/T2 frame index post-scavenging while working out fixes
for a few bugs.

llvm-svn: 84791
2009-10-21 22:59:24 +00:00
Benjamin Kramer
a5cb240184 Simplify code. No intended functionality change.
llvm-svn: 84790
2009-10-21 22:55:51 +00:00
Devang Patel
7e3d4b199c Use StringRef.
llvm-svn: 84786
2009-10-21 21:57:13 +00:00
Bob Wilson
26a4580439 Most of the NEON shuffle instructions do not support 64-bit element types.
llvm-svn: 84785
2009-10-21 21:36:27 +00:00
Devang Patel
d10159397a Do not use SmallVector to store MDNode elements.
llvm-svn: 84784
2009-10-21 21:25:09 +00:00
Anton Korobeynikov
141a4a2f42 Revert r84764, it breaks mingw build
llvm-svn: 84783
2009-10-21 21:15:18 +00:00
Jim Grosbach
452de96b04 Improve handling of immediates by splitting 32-bit immediates into two 16-bit
immediate operands when they will fit into the using instruction.

llvm-svn: 84778
2009-10-21 20:44:34 +00:00
Anton Korobeynikov
23ea13afbb Add DAG printing for RMW stuff debugging
llvm-svn: 84776
2009-10-21 19:18:28 +00:00
Anton Korobeynikov
d233af8049 RMW preprocessing stuff was incorrect. Grab the stuff from x86 backend and disable some tests until it will be clever enough to handle them.
llvm-svn: 84775
2009-10-21 19:17:55 +00:00
Anton Korobeynikov
6329ddd231 Implement branch folding
llvm-svn: 84774
2009-10-21 19:17:18 +00:00
Anton Korobeynikov
c9ed87ea9a Cosmetic changes, no functionality changes
llvm-svn: 84773
2009-10-21 19:16:49 +00:00
Victor Hernandez
0996619220 Make changes to rev 84292 as requested by Chris Lattner.
Most changes are cleanup, but there is 1 correctness fix:
I fixed InstCombine so that the icmp is removed only if the malloc call is removed (which requires explicit removal because the Worklist won't DCE any calls since they can have side-effects).

llvm-svn: 84772
2009-10-21 19:11:40 +00:00
Bob Wilson
41f94edfb0 Fix NEON VST2LN instruction encoding.
Patch by Johnny Chen.

llvm-svn: 84767
2009-10-21 17:54:01 +00:00
Bob Wilson
5f9ea75e2b Revert 84732. It was the wrong fix.
llvm-svn: 84766
2009-10-21 17:52:34 +00:00
Devang Patel
7137e5f065 Incorporate various suggestions Chris gave during metadata review.
- i < getNumElements()  instead of getNumElements() > i
- Make setParent() private
- Fix use of resizeOperands
- Reset HasMetadata bit after removing all metadata attached to an instruction
- Efficient use of iterators

llvm-svn: 84765
2009-10-21 17:33:41 +00:00
Sanjiv Gupta
9e78b53be3 Build shared lib instead of an archive.
llvm-svn: 84764
2009-10-21 17:27:23 +00:00
Jim Grosbach
8b0af4b521 Cleanup of frame index scavenging. Better code flow and more accurately
handles T2 and ARM use cases.

llvm-svn: 84761
2009-10-21 15:26:21 +00:00
Torok Edwin
a8a12b7d98 Fix PR5262: when folding select into PHI, make sure all operands are available
in the PHI's Basic Block. This uses a conservative approach, because we don't
have dominator info in instcombine.

llvm-svn: 84754
2009-10-21 10:49:00 +00:00
Sanjiv Gupta
d6fd961c5c Add a pass to overlay pic16 data sections for function frame and automatic
variables. This pass can be invoked by llvm-ld or opt to traverse over the call graph 
to detect what function frames and their automatic variables can be overlaid.
Currently this builds an archive , but needs to be changed to a loadable module.

llvm-svn: 84753
2009-10-21 10:42:44 +00:00
Evan Cheng
275a09e55d Match more patterns to movt.
llvm-svn: 84751
2009-10-21 08:15:52 +00:00
Evan Cheng
69e133fd77 Need a comma after imp-use.
llvm-svn: 84749
2009-10-21 07:56:02 +00:00
Douglas Gregor
fecaeae94b De-bork CMake build
llvm-svn: 84744
2009-10-21 06:01:54 +00:00
Chris Lattner
82599d2b0e make GVN work better when TD is not around:
"In the existing code, if the load and the value to replace it with are
of different types *and* target data is available, it tries to use the
target data to coerce the replacement value to the type of the load.
Otherwise, it skips all effort to handle the type mismatch and just
feeds the wrongly-typed replacement value to replaceAllUsesWith, which
triggers an assertion.

The patch replaces it with an outer if checking for type mismatch, and
an inner if-else that checks whether target data is available and, if
not, returns false rather than trying to replace the load."

Patch by Kenneth Uildriks!

llvm-svn: 84739
2009-10-21 04:11:19 +00:00
Chris Lattner
690911b253 tidy
llvm-svn: 84738
2009-10-21 04:10:24 +00:00
Bob Wilson
02d3df4a87 Fix some more NEON instruction encoding problems.
Thanks to Johnny Chen for discovering the problem.

llvm-svn: 84732
2009-10-21 02:27:20 +00:00
Devang Patel
64fe3f9be0 Do not remove dead metadata for now.
llvm-svn: 84731
2009-10-21 02:21:34 +00:00
Bob Wilson
e85a3142bc Leave some NEON instruction encoding bits unspecified instead of setting
a default value of zero.  This is important for decoding the instructions.
Patch by Johnny Chen, with some changes from me, too.

llvm-svn: 84730
2009-10-21 02:15:46 +00:00
Dan Gohman
c74da745a7 Revert r84658 and r84691. They were causing llvm-gcc bootstrap to fail.
llvm-svn: 84727
2009-10-21 01:44:44 +00:00
Chris Lattner
2363ec8194 IPSCCP is missing stuff.
llvm-svn: 84725
2009-10-21 01:10:37 +00:00
Jeffrey Yasskin
4ea1de7bcf Delete the MacOSJITEventListener per echristo's request. It was disabled by
default and didn't work anyway.

llvm-svn: 84720
2009-10-21 00:43:48 +00:00
Anton Korobeynikov
7c7a801467 Add note
llvm-svn: 84713
2009-10-21 00:14:15 +00:00
Anton Korobeynikov
f7e27bb17e Be crazy and assert in case of unsupported modifier passed.
llvm-svn: 84712
2009-10-21 00:13:58 +00:00
Anton Korobeynikov
3b90c55321 Handle external symbols
llvm-svn: 84711
2009-10-21 00:13:42 +00:00
Anton Korobeynikov
d104087bfe Distinguish between pcrel imm operands and 'normal' ones. Fix fixes gross weirdness of asmprinting.
llvm-svn: 84710
2009-10-21 00:13:25 +00:00
Anton Korobeynikov
c35bd58bd5 Add basic block operands & jump kinds
llvm-svn: 84709
2009-10-21 00:13:05 +00:00
Anton Korobeynikov
2bcb24c40b Ignore all implicit reg operands
llvm-svn: 84708
2009-10-21 00:12:44 +00:00
Anton Korobeynikov
f3003dfcd1 Add a workaround for different memops prefixes
llvm-svn: 84707
2009-10-21 00:12:27 +00:00
Anton Korobeynikov
af4c4ee8f5 Checkpoint MCInst printer. We (almostly) able to print global / JT / constpool entries
llvm-svn: 84706
2009-10-21 00:12:08 +00:00
Anton Korobeynikov
5a6771aab2 Add simple operand printing stuff
llvm-svn: 84704
2009-10-21 00:11:27 +00:00
Anton Korobeynikov
8b01906b63 Add experimental MSP430 MCInstLowering stuff
llvm-svn: 84703
2009-10-21 00:11:08 +00:00
Anton Korobeynikov
0c059394ac Wire up MSP430 printMCInst() method
llvm-svn: 84702
2009-10-21 00:10:47 +00:00
Anton Korobeynikov
a534ef3f63 Add MSP430 InstPrinter stub
llvm-svn: 84701
2009-10-21 00:10:30 +00:00
Anton Korobeynikov
8dc97f136b Use proper target data
llvm-svn: 84700
2009-10-21 00:10:00 +00:00
David Goodwin
90fcfc5f88 Respect src register allocation requirements when breaking anti-dependencies. Remove some dead code.
llvm-svn: 84691
2009-10-20 22:50:43 +00:00
Devang Patel
7edc7aa34d Cosmetic changes.
s/validName/isValidName/g
s/with an Instruction/to an Instruction/g
s/RegisterMDKind/registerMDKind/g

llvm-svn: 84689
2009-10-20 22:50:27 +00:00
Daniel Dunbar
502e00c5b9 Fix -Asserts warning.
llvm-svn: 84687
2009-10-20 22:10:05 +00:00
Anton Korobeynikov
7b6fe9f251 Fix invalid for vector types fneg(bitconvert(x)) => bitconvert(x ^ sign)
transform.

llvm-svn: 84683
2009-10-20 21:37:45 +00:00
Lang Hames
5ab1db4859 Oops. Backing out 84681 - needs to wait for the indexing patch.
llvm-svn: 84682
2009-10-20 21:28:22 +00:00
Lang Hames
0a7caf4bb3 Added some debugging output to pre-alloc splitting.
llvm-svn: 84681
2009-10-20 21:25:13 +00:00
Dan Gohman
bc58eb97fe Fix another place that calls Loop::contains a lot to construct a sorted
container of the blocks and do efficient lookups. This makes
isLoopSimplifyForm much faster on large loops, fixing a significant
compile-time issue in builds with assertions enabled.

llvm-svn: 84673
2009-10-20 20:41:13 +00:00
Jim Grosbach
8a182902ef Disable by default while debugging
llvm-svn: 84669
2009-10-20 20:31:31 +00:00
Chris Lattner
803539f022 alternate fix for PR5258 which avoids worklist problems, with reduced testcase.
llvm-svn: 84667
2009-10-20 20:27:49 +00:00
Jim Grosbach
5f9188c873 add cmd line opt to disable frame index reuse for ARM and T2. debug aid.
llvm-svn: 84664
2009-10-20 20:19:50 +00:00
Dan Gohman
ea9ddb0313 Restore LoopUnswitch's block-oriented threshold. LoopUnswitch now checks both
the estimated code size and the number of blocks when deciding whether to
do a non-trivial unswitch. This protects it from some very undesirable
worst-case behavior on large numbers of loop-unswitchable conditions, such
as in the testcase in PR5259.

llvm-svn: 84661
2009-10-20 20:06:09 +00:00
David Goodwin
048b80a70a Checkpoint more aggressive anti-dependency breaking for post-ra scheduler.
llvm-svn: 84658
2009-10-20 19:54:44 +00:00
Jim Grosbach
7800d00f20 Better handle instructions that re-def a scratch register
llvm-svn: 84657
2009-10-20 19:52:35 +00:00
Dan Gohman
6b54c70e78 Following r84485, add Defs = [EFLAGS] to the 32-bit lock instructions too.
llvm-svn: 84652
2009-10-20 18:14:49 +00:00
Jeffrey Yasskin
c5bf1f8ad9 Move the Function*->allocated blocks map from the JITMemoryManager to the
JITEmitter.

I'm gradually making Functions auto-remove themselves from the JIT when they're
destroyed. In this case, the Function needs to be removed from the JITEmitter,
but the map recording which Functions need to be removed lived behind the
JITMemoryManager interface, which made things difficult.

This patch replaces the deallocateMemForFunction(Function*) method with a pair
of methods deallocateFunctionBody(void *) and deallocateExceptionTable(void *)
corresponding to the two startFoo/endFoo pairs.

llvm-svn: 84651
2009-10-20 18:13:21 +00:00
Jim Grosbach
5ce30430a4 Register re-use for scavenged frame indices must check for re-deginition
of the register in the instruction which kills the scavenged value.

llvm-svn: 84641
2009-10-20 16:33:57 +00:00
Dan Gohman
e0ace5c4eb Make TranslateX86CC return COND_INVALID instead of aborting when it
encounters an OEQ or UNE comparison, and update its callers to check
for this return status and recover. This fixes a problem resulting from
the LowerOperation hooks being called from LegalizeVectorOps, because
LegalizeVectorOps only lowers vectors, so OEQ and UNE comparisons may
still be at large. This fixes PR5092.

llvm-svn: 84640
2009-10-20 16:22:37 +00:00
Torok Edwin
bdcd45a9d6 Fix PR5258, jump-threading creating invalid PHIs.
When an incoming value for a PHI is updated, we must also updated all other
incoming values for the same BB to match, otherwise we create invalid PHIs.

llvm-svn: 84638
2009-10-20 15:42:00 +00:00
Torok Edwin
3801e755cc Fix PR4313: IPSCCP was not setting the lattice value for the invoke instruction
when the invoke had multiple return values: it set the lattice value only on the
extractvalue.
This caused the invoke's lattice value to remain the default (undefined), and
later propagated to extractvalue's operand, which incorrectly introduces
undefined behavior.

llvm-svn: 84637
2009-10-20 15:15:09 +00:00
Benjamin Kramer
dee347a8e8 Random #include pruning.
llvm-svn: 84632
2009-10-20 11:44:38 +00:00
Sanjiv Gupta
28330ebddc This file is replaeced by PIC16Section.h.
llvm-svn: 84628
2009-10-20 09:16:32 +00:00
Chris Lattner
2a04686991 implement some more easy hooks.
llvm-svn: 84614
2009-10-20 06:22:33 +00:00
Chris Lattner
8137f1aef2 Implement some hooks, make printOperand abort if unknown modifiers are
present.

llvm-svn: 84613
2009-10-20 06:15:28 +00:00
Chris Lattner
dfe75a5667 t2MOVi32imm is currently always lowered by the Thumb2ITBlockPass.
llvm-svn: 84611
2009-10-20 05:58:02 +00:00
Daniel Dunbar
87b361d3d6 Wire up the ARM MCInst printer, for llvm-mc.
llvm-svn: 84600
2009-10-20 05:15:36 +00:00