Chris Lattner
4d10f1a6c9
comment cleanup, reduce nesting.
...
llvm-svn: 75398
2009-07-11 22:50:33 +00:00
Chris Lattner
24f6ad5ae4
remove some dead patterns, WrapperRIP doesn't exist in -static mode
...
anymore, so these aren't needed.
llvm-svn: 75397
2009-07-11 22:47:21 +00:00
Chris Lattner
a797d376de
silence vc++ warning.
...
llvm-svn: 75394
2009-07-11 22:32:37 +00:00
Chris Lattner
2f67295aac
silence a vc++ warning.
...
llvm-svn: 75393
2009-07-11 22:31:59 +00:00
Chris Lattner
056dfc6f90
this test was incorrect for x86-64 static. It passed on darwin, because darwin
...
doesn't have static x86-64 mode.
llvm-svn: 75392
2009-07-11 22:30:05 +00:00
Daniel Dunbar
8bda49a827
Tweak comment.
...
llvm-svn: 75391
2009-07-11 22:06:10 +00:00
Daniel Dunbar
d66cc5c781
Update CMakeLists.txt
...
llvm-svn: 75389
2009-07-11 21:53:14 +00:00
Daniel Dunbar
9dc326fbaa
Fix unused function warning.
...
llvm-svn: 75386
2009-07-11 21:24:52 +00:00
Nick Lewycky
c0bf46b226
Revert r75252 which was causing some crashes at compile time.
...
llvm-svn: 75384
2009-07-11 20:38:25 +00:00
Chris Lattner
e91900097e
Fix PR4533, which is about buggy codegen in x86-64 -static mode.
...
Basically, using:
lea symbol(%rip), %rax
is not valid in -static mode, because the current RIP may not be
within 32-bits of "symbol" when an app is built partially pic and
partially static. The fix for this is to compile it to:
lea symbol, %rax
It would be better to codegen this as:
movq $symbol, %rax
but that will come next.
The hard part of fixing this bug was fixing abi-isel, which was actively
testing for the wrong behavior. Also, the RUN lines are completely impossible
to understand what they are testing. To help with this, convert the -static
x86-64 codegen tests to use filecheck. This is much more stable and makes it
more clear what the codegen is expected to be.
llvm-svn: 75382
2009-07-11 20:29:19 +00:00
Torok Edwin
4eb1ad2086
Fix comment.
...
llvm-svn: 75380
2009-07-11 20:13:58 +00:00
Torok Edwin
56d0659726
assert(0) -> LLVM_UNREACHABLE.
...
Make llvm_unreachable take an optional string, thus moving the cerr<< out of
line.
LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for
NDEBUG builds.
llvm-svn: 75379
2009-07-11 20:10:48 +00:00
Daniel Dunbar
3085b57bb8
Stub out assembly matcher (.s -> MCInst) tblgen backend.
...
llvm-svn: 75378
2009-07-11 19:39:44 +00:00
Mikhail Glushenkov
0decbb2ad0
Regenerate.
...
llvm-svn: 75376
2009-07-11 19:28:00 +00:00
Mikhail Glushenkov
bee767fa26
Update documentation.
...
llvm-svn: 75375
2009-07-11 19:27:40 +00:00
Mikhail Glushenkov
3c9e8d3b1f
Delete the temp dir even when '--temp-dir' is specified.
...
llvm-svn: 75374
2009-07-11 19:27:07 +00:00
Nick Lewycky
fc69ee2cc6
Fix handling of max and full set.
...
A full set is a constant range that represents any number. If you take the
umax of that and [5, 10) you end up with [5, INT_MAX] because the values less
than 5 would be umax's against a value which is at least 5.
llvm-svn: 75372
2009-07-11 19:22:21 +00:00
Chris Lattner
0029c0e57a
improve filecheck's "scanning from here" caret position.
...
llvm-svn: 75371
2009-07-11 19:21:09 +00:00
Chris Lattner
2c3e5cdf3d
make filecheck default to canonicalizing horizontal whitespace
...
away. This way you can write a space and it matches arbitrary spaces and tabs.
llvm-svn: 75370
2009-07-11 18:58:15 +00:00
Nick Lewycky
17a4fa84ee
Break the world's largest unit test down a few logical lines. No semantic
...
changes.
llvm-svn: 75369
2009-07-11 18:43:20 +00:00
Sanjiv Gupta
594006524b
Erase the temp dir before starting.
...
llvm-svn: 75367
2009-07-11 17:35:46 +00:00
Nick Lewycky
9c5fc41547
Clarify and simplify.
...
llvm-svn: 75366
2009-07-11 17:04:01 +00:00
Dan Gohman
a32ee1d3f2
Don't use a void return type with a function that returns a value.
...
llvm-svn: 75364
2009-07-11 13:56:14 +00:00
Torok Edwin
ccb29cd290
Convert more assert(0)+abort() -> LLVM_UNREACHABLE,
...
and abort()/exit() -> llvm_report_error().
llvm-svn: 75363
2009-07-11 13:10:19 +00:00
Chris Lattner
20adc670b2
We get the P modifier wrong in a lot of cases, just add some more rigorous testing.
...
In addition to fixing this, I still need to do some more testing on darwin.
llvm-svn: 75362
2009-07-11 08:30:22 +00:00
Evan Cheng
017288a4fc
Don't put IT instruction before conditional branches.
...
llvm-svn: 75361
2009-07-11 07:26:20 +00:00
Evan Cheng
0794c6a083
Smarter isel of ldrsb / ldrsh. Only make use of these when [r,r] address is feasible.
...
llvm-svn: 75360
2009-07-11 07:08:13 +00:00
Evan Cheng
cd4cdd1157
Major changes to Thumb (not Thumb2). Many 16-bit instructions either modifies CPSR when they are outside the IT blocks, or they can predicated when in Thumb2. Move the implicit def of CPSR to an optional def which defaults CPSR. This allows the 's' bit to be toggled dynamically.
...
A side-effect of this change is asm printer is now using unified assembly. There are some minor clean ups and fixes as well.
llvm-svn: 75359
2009-07-11 06:43:01 +00:00
Evan Cheng
bf041366c4
80 col violation.
...
llvm-svn: 75358
2009-07-11 06:37:27 +00:00
Nick Lewycky
dcfdce9067
Move a method that creates constant ranges relative to another constant range
...
per icmp predicate out of predsimplify and into ConstantRange.
Add another utility method that determines whether one range is a subset of
another. Combine with the former to determine whether icmp pred range, range
is known to be true or not.
llvm-svn: 75357
2009-07-11 06:15:39 +00:00
Evan Cheng
ede2ce71aa
Fix up support for OptionalDefOperand when it defaults to an actual register def. I need this to get ready for major Thumb1 surgery.
...
llvm-svn: 75328
2009-07-11 01:06:50 +00:00
Eli Friedman
106f2885d1
Use CreateStackStoreLoad helper in more places.
...
llvm-svn: 75320
2009-07-11 00:11:07 +00:00
Evan Cheng
b4dfce2dba
Two-address pass should use findCommutedOpIndices to determine what registers are commuted.
...
llvm-svn: 75317
2009-07-11 00:04:23 +00:00
Evan Cheng
1297799096
Use findCommutedOpIndices to find the operands to commute.
...
llvm-svn: 75312
2009-07-10 23:26:12 +00:00
Bob Wilson
a51f8ebf1a
Add superclasses of ARM Neon quad registers. The Q2PR class contains pairs of
...
quad registers and the Q4PR class holds sets of 4 quad registers.
llvm-svn: 75309
2009-07-10 23:09:06 +00:00
Bob Wilson
73fd66c06b
Add new vector types for 192-bit, 348-bit and 512-bit sizes.
...
These are needed to represent ARM Neon struct datatypes containing 2, 3 or 4
separate vectors.
llvm-svn: 75308
2009-07-10 23:05:09 +00:00
Chris Lattner
2745607dc6
remove the "debug" modifier, it is only used by one instruction which can
...
never be generated.
llvm-svn: 75305
2009-07-10 22:34:11 +00:00
Bob Wilson
bf8e4c1128
Refactor TableGen's llvm::getName to share code with llvm::getEnumName,
...
since names are the same for almost all the types.
llvm-svn: 75302
2009-07-10 22:25:24 +00:00
Chris Lattner
07cadaf113
add support for .zerofill, patch by Kevin Enderby!
...
llvm-svn: 75301
2009-07-10 22:20:30 +00:00
Jeffrey Yasskin
228be77c19
Oops. s/#if defined(USE_OPROFILE)/#if USE_OPROFILE/. We #define
...
USE_OPROFILE to 0 on some paths through configure, which does the
wrong thing with #if defined().
llvm-svn: 75300
2009-07-10 22:13:21 +00:00
Chris Lattner
a6009306c2
make pcrel and non-pcrel global printing more similar.
...
llvm-svn: 75298
2009-07-10 21:57:21 +00:00
David Goodwin
73f4e3f442
Support remote execute for ARM.
...
llvm-svn: 75292
2009-07-10 21:39:28 +00:00
Evan Cheng
7997cbf2d5
Undo my brain cramp.
...
llvm-svn: 75290
2009-07-10 21:31:42 +00:00
David Greene
c97b778b3c
Make changes suggested by Chris and eliminate newly-added raw_ostream
...
hooks as they're no longer needed.
The major change with this patch is to make formatted_raw_ostream usable
by any client of raw_ostream.
llvm-svn: 75283
2009-07-10 21:14:44 +00:00
Jeffrey Yasskin
efbc3a52b6
Regenerate configure after r75279.
...
llvm-svn: 75280
2009-07-10 21:09:55 +00:00
Jeffrey Yasskin
bf3d6ba557
Add a --with-oprofile flag to configure, which uses OProfile's agent
...
library to tell it the addresses of JITted functions. For a
particular program, this changes the opreport -l output from:
samples % image name symbol name
48182 98.9729 anon (tgid:19412 range:0x7f12ccaab000-0x7f12cdaab000) anon (tgid:19412 range:0x7f12ccaab000-0x7f12cdaab000)
11 0.0226 libstdc++.so.6.0.9 /usr/lib/libstdc++.so.6.0.9
to:
samples % image name symbol name
24565 60.7308 19814.jo fib_left
15365 37.9861 19814.jo fib_right
22 0.0544 ld-2.7.so do_lookup_x
llvm-svn: 75279
2009-07-10 21:08:20 +00:00
Chris Lattner
25e7f91559
code model is never set to default.
...
llvm-svn: 75278
2009-07-10 21:03:06 +00:00
Chris Lattner
7dce9919e1
fix indentation
...
llvm-svn: 75277
2009-07-10 21:01:59 +00:00
Chris Lattner
21c2940553
remove the now-dead TM argument to these methods.
...
llvm-svn: 75276
2009-07-10 21:00:45 +00:00
Chris Lattner
ba4d73310a
make PIC vs DynamicNoPIC be explicit in PICStyles.
...
llvm-svn: 75275
2009-07-10 20:58:47 +00:00
Chris Lattner
bd3e560f1a
some minor simplifications.
...
llvm-svn: 75274
2009-07-10 20:53:38 +00:00
Chris Lattner
e2f524f176
add a couple of predicates to test for "stub style pic in PIC mode" and "stub style pic in dynamic-no-pic" mode.
...
llvm-svn: 75273
2009-07-10 20:47:30 +00:00
Dan Gohman
028e6158c2
Remove ScalarEvolution::hasSCEV, which isn't being used, and which
...
breaks encapsulation. Also remove a dead prototype for setSCEV.
llvm-svn: 75272
2009-07-10 20:25:29 +00:00
Duncan Sands
48d983c86e
Avoid compiler warnings when assertions are turned off.
...
llvm-svn: 75269
2009-07-10 20:10:14 +00:00
Duncan Sands
45210aab86
Avoid compiler warnings if assertions turned off.
...
llvm-svn: 75267
2009-07-10 20:07:07 +00:00
Evan Cheng
bb00fe0dc6
CMOVxx doesn't swap operands which it's commuted.
...
llvm-svn: 75266
2009-07-10 19:26:57 +00:00
Evan Cheng
f075943584
Remove TargetInstrInfo::CommuteChangesDestination and added findCommutedOpIndices which returns the operand indices which are swapped (when applicable). This allows for some code clean up and future enhancements.
...
llvm-svn: 75264
2009-07-10 19:15:51 +00:00
Sanjiv Gupta
62609a4131
Link std.lib (.bc code) with llvm-ld.
...
Link devices.lib (processor specific variables) with mplink.
llvm-svn: 75263
2009-07-10 19:04:05 +00:00
Owen Anderson
c490dee828
Fix unit tests.
...
llvm-svn: 75262
2009-07-10 18:58:29 +00:00
Chris Lattner
e3c4765bac
convert test to use FileCheck, which is much more precise and faster than
...
the previous RUN lines. Hopefully this will be an inspiration for future
tests :)
llvm-svn: 75261
2009-07-10 18:34:47 +00:00
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