Commit Graph

48173 Commits

Author SHA1 Message Date
Chris Lattner b797115561 add missing *, patch by Peter O'Gorman!
llvm-svn: 75259
2009-07-10 18:28:19 +00:00
Owen Anderson 4898c32ce9 Push LLVMContext through the TypeBuilder API. There are no users for this in-tree, so I can't really test it.
If you're using this, and it's broken, please send patches.

llvm-svn: 75257
2009-07-10 18:10:10 +00:00
David Greene 68ba0df07d Eliminate an unnecessary include.
llvm-svn: 75256
2009-07-10 17:55:38 +00:00
Owen Anderson 16e7674f4b Push LLVMContext through the PatternMatch API.
llvm-svn: 75255
2009-07-10 17:35:01 +00:00
David Goodwin 81cdd21dcb Predicate VFP instructions on HasVFP2 instead of IsARM. This allows VFP instructions with thumb-2.
llvm-svn: 75254
2009-07-10 17:03:29 +00:00
Dan Gohman a9938d8226 Generalize ScalarEvolution's cast-folding code to support more kinds
of loops. Add several new functions to for working with ScalarEvolution's
add-hoc value-range analysis functionality.

llvm-svn: 75252
2009-07-10 16:42:52 +00:00
Owen Anderson 96b491a1fa Update for GlobalVariables ctor change.
llvm-svn: 75251
2009-07-10 16:42:19 +00:00
David Goodwin c9b1efd515 t2LDM_RET does not fall-through.
llvm-svn: 75250
2009-07-10 15:33:46 +00:00
Duncan Sands 0006349f4d Add Thumb2ITBlockPass.cpp to CMakeLists.txt, fixing
the cmake build.

llvm-svn: 75246
2009-07-10 08:31:50 +00:00
Chris Lattner 9531b039b9 make this more like printOperand. Perhaps some merging will happen
tomorrow.

llvm-svn: 75245
2009-07-10 07:50:52 +00:00
Chris Lattner 20073edf67 simplify fast isel by using ClassifyGlobalReference. This
elimiantes the last use of GVRequiresExtraLoad, so delete it.

llvm-svn: 75244
2009-07-10 07:48:51 +00:00
Chris Lattner 93f0f79178 eliminate GVRequiresRegister, replacing it with predicates we
need for other purposes.

llvm-svn: 75243
2009-07-10 07:38:24 +00:00
Chris Lattner 2ff35f528c change a bunch of logic in LowerGlobalAddress to leverage the work
done in ClassifyGlobalReference instead of reconstructing the info
awkwardly.

llvm-svn: 75240
2009-07-10 07:34:39 +00:00
Chris Lattner d3f32c725b add a predicate to determine if a global var reference requires a
PIC-base to be added in.

llvm-svn: 75238
2009-07-10 07:33:30 +00:00
Chris Lattner dc842c06c2 move some classification logic around. Now GVRequiresExtraLoad
is just a trivial wrapper around "ClassifyGlobalReference", which
stole a ton of logic from LowerGlobalAddress.

llvm-svn: 75237
2009-07-10 07:20:05 +00:00
Chris Lattner ca9d784bf1 change isGlobalStubReference to take target flags instead of a MachineOperand.
llvm-svn: 75236
2009-07-10 06:29:59 +00:00
Chris Lattner e6d259340e convert some late code (called by regalloc and code emission)
to use isGlobalStubReference instead of GVRequiresExtraLoad
(which should really be part of isel).

llvm-svn: 75234
2009-07-10 06:07:08 +00:00
Chris Lattner 377f1d5373 add a new predicate method that says whether a GlobalValue
MachineOperand is a reference to a stub, not a reference to the
global variable itself.  Look no context needed!

llvm-svn: 75233
2009-07-10 06:06:17 +00:00
Chris Lattner b9af63a4d2 GVRequiresExtraLoad is now never used for calls, simplify it based on this.
llvm-svn: 75232
2009-07-10 05:52:02 +00:00
Chris Lattner ace6ec26d9 actually, just eliminate PCRelGVRequiresExtraLoad. It makes the code
more complex and slow than just directly testing what we care about.

llvm-svn: 75231
2009-07-10 05:48:03 +00:00
Chris Lattner 7277a807f0 There is only one case where GVRequiresExtraLoad returns true for calls:
split its handling out to PCRelGVRequiresExtraLoad, and simplify code
based on this.

llvm-svn: 75230
2009-07-10 05:45:15 +00:00
Chris Lattner 1cc7ae7c3b the "isDirectCall" operand of GVRequiresRegister is always false, eliminate it.
llvm-svn: 75229
2009-07-10 05:37:11 +00:00
Chris Lattner 8212d37e7d split call handling out of X86SelectAddress into X86SelectCallAddress
llvm-svn: 75228
2009-07-10 05:33:42 +00:00
Chris Lattner 405d024c71 convert a helper method to be a static function instead of a
template.  Also convert it to take a MachineOperand instead of a GV*

llvm-svn: 75227
2009-07-10 05:27:43 +00:00
Evan Cheng 9a0ec0787c 80 col violation.
llvm-svn: 75226
2009-07-10 05:20:19 +00:00
Evan Cheng 01b8630879 More info about Thumb1 predication support.
llvm-svn: 75220
2009-07-10 02:10:17 +00:00
Evan Cheng 61671c87a7 We don't need separate thumb1 instructions tADDSi3 etc. for addc and subc. The "normal" version always modify condition register CPSR so we should just use def : pat to match to the same instructions.
llvm-svn: 75219
2009-07-10 02:09:04 +00:00
Evan Cheng 0f9cce7951 Add a thumb2 pass to insert IT blocks.
llvm-svn: 75218
2009-07-10 01:54:42 +00:00
Evan Cheng 3b88dd6900 Move isPredicated from .cpp to .h
llvm-svn: 75217
2009-07-10 01:38:27 +00:00
Owen Anderson 393569874f Finish pushing LLVMContext through the IRBuilder/ConstantFolder interface.
llvm-svn: 75213
2009-07-10 00:49:53 +00:00
Evan Cheng 5d8a1b2c18 80 col violation.
llvm-svn: 75212
2009-07-10 00:45:16 +00:00
David Greene 98f741bd77 Fix #include specification.
llvm-svn: 75208
2009-07-10 00:34:39 +00:00
Ted Kremenek 2be6797ead ImmutableMap/ImmutableSet: Allow caching of ImutAVLTree digests while the tree
is still mutable. My experiments show this reduces the amount of times we
compute a full tree digest by over 50% on very small cases, and potentially much
larger on others.

llvm-svn: 75207
2009-07-10 00:33:43 +00:00
Evan Cheng 223ac25930 Remove a bogus assertion.
llvm-svn: 75206
2009-07-10 00:23:48 +00:00
Bob Wilson 75aa75cabc Replace TM.getRegisterInfo() calls by TRI instance variable.
Use getAsmName() method instead of accessing AsmName field directly.

llvm-svn: 75205
2009-07-10 00:14:05 +00:00
David Greene cd94645665 Redesign this to avoid standard stream classes. This stream class
provides pretty -printing of comments and other such things in asm
files.

llvm-svn: 75202
2009-07-09 23:56:35 +00:00
Bob Wilson 9ce44e2521 Handle 'a' modifier on inline assembly operands.
This is part of the fix for pr4521.

llvm-svn: 75201
2009-07-09 23:54:51 +00:00
Owen Anderson 1e5f00e7a7 This started as a small change, I swear. Unfortunately, lots of things call the [I|F]CmpInst constructors. Who knew!?
llvm-svn: 75200
2009-07-09 23:48:35 +00:00
David Greene ab11a81fc0 Add some hooks that a redesigned AsmStream needs to do its job. These
allow derived classes to examine the stream buffer before it's flushed.

llvm-svn: 75199
2009-07-09 23:43:41 +00:00
Evan Cheng 26b2ba4285 Added Thumb IT instruction.
llvm-svn: 75198
2009-07-09 23:43:36 +00:00
Bob Wilson f76798769f Fix an apparent copy-and-paste problem in an error message.
llvm-svn: 75197
2009-07-09 23:42:59 +00:00
Evan Cheng ae4f2e142a Another todo entry.
llvm-svn: 75192
2009-07-09 23:17:28 +00:00
Dan Gohman dc33ae27ed Revert the part of 75177 that split ConstantRange into two classes, and
merge the new functionality and unittests into ConstantRange. Thanks to
Nick Lewycky for pointing out that it isn't necessary to have two separate
classes here.

llvm-svn: 75191
2009-07-09 23:16:10 +00:00
Evan Cheng 4605e8aac4 Initial support for load / store multiple opt pass Thumb2 support (post-allocation only). It's kind of there, but not quite. I'll return to this later.
llvm-svn: 75190
2009-07-09 23:11:34 +00:00
Evan Cheng 1622d7b429 Fix ldm / stm unified syntax; add t2LDM_RET.
llvm-svn: 75188
2009-07-09 22:58:39 +00:00
Evan Cheng a02fc2d327 LDM_RET should be marked mayLoad.
llvm-svn: 75187
2009-07-09 22:57:41 +00:00
Bill Wendling ad6c36f065 If -fomit-frame-pointer is used, we still need to record when the %esp register
is modified. Otherwise, the unwinder will get confused. The old code (before I
started my hacking) did this. It dropped on the floor, because I wasn't aware of
this requirement.

On the plus side, if we use "alloca" in a function, we create frame pointers
even with -fomit-frame-pointer is enabled!

This is a Good Thing(tm)!!!

llvm-svn: 75183
2009-07-09 22:30:02 +00:00
Evan Cheng 7591d02c84 Fix ldrd / strd address mode matching code. It allows for +/- 8 bit offset. Also change the printer to make the scale 4 explicit.
Note, we are not yet generating these instructions.

llvm-svn: 75181
2009-07-09 22:21:59 +00:00
Andreas Bolka 75f341dc23 Fix typo, trailing whitespace.
llvm-svn: 75179
2009-07-09 22:14:25 +00:00
Dan Gohman 5035fbf91c Add a ConstantSignedRange class, which does for signed integers
what ConstantRange does for unsigned integers. Factor out a
common base class for common functionality.

Add some new functions for performing arithmetic on constant
ranges. Some of these are currently just stubbed out with
conservative implementations.

Add unittests for ConstantRange and ConstantSignedRange.

llvm-svn: 75177
2009-07-09 22:07:27 +00:00