Chris Lattner
85478e8cd1
convert a bunch more stuff to use StringRef. The ArgName arguments are now
...
stringref because they may not be nul terminated. For options like -Lfoo
this now avoids a O(n) temporary std::strings where N is the length of
the string after -L.
llvm-svn: 82345
2009-09-20 00:40:49 +00:00
Dale Johannesen
f8d05d7ce6
When computing live intervals for earlyclobber operands,
...
we pushed the beginning of the interval back 1, so the
interval would overlap with inputs that die. We were
also pushing the end of the interval back 1, though,
which means the earlyclobber didn't overlap with other
output operands. Don't do this. PR 4964.
llvm-svn: 82342
2009-09-20 00:36:41 +00:00
Chris Lattner
bb111eeae4
avoid a bunch of malloc thrashing for PositinoalVals by eliminating
...
a std::vector and a bunch of std::string temporaries.
llvm-svn: 82341
2009-09-20 00:07:40 +00:00
Nick Lewycky
6ad3b51864
Teach the constant folder how to handle a few simple i1 cases.
...
llvm-svn: 82340
2009-09-20 00:04:02 +00:00
Chris Lattner
b29a51b4d4
Avoid some temporary strings.
...
llvm-svn: 82339
2009-09-19 23:59:02 +00:00
Chris Lattner
d2a0138c62
add some more overloads of StringRef::getAsInteger for
...
common and useful integer types.
llvm-svn: 82338
2009-09-19 23:58:48 +00:00
Bill Wendling
5dfef4dce4
Revert r82274. It's causing failures in the CINT2006 benchmarks.
...
llvm-svn: 82336
2009-09-19 22:02:37 +00:00
Daniel Dunbar
9ae3c56c92
Fix indentation.
...
llvm-svn: 82333
2009-09-19 20:40:14 +00:00
Daniel Dunbar
39c0d90339
Strip trailing whitespace.
...
llvm-svn: 82332
2009-09-19 20:40:05 +00:00
Nick Lewycky
3b7df4bbd5
Remove the default value for ConstantStruct::get's isPacked parameter and
...
update the code which was broken by this.
llvm-svn: 82327
2009-09-19 20:30:26 +00:00
Chris Lattner
e6fa81a475
provide a "strtoull" operation that works on StringRef's.
...
llvm-svn: 82322
2009-09-19 19:47:14 +00:00
Nick Lewycky
e539e55f2a
Add a comment explaining why you would ever want to do this.
...
llvm-svn: 82319
2009-09-19 19:00:06 +00:00
Chris Lattner
86c1fbbc0a
convert a bunch of std::strings to use StringRef. This should eliminate
...
a massive number of temporary strings created when parsing a command line.
More still left to eliminate.
llvm-svn: 82318
2009-09-19 18:55:05 +00:00
Nick Lewycky
441d1e8dd5
Lett users of sparse propagation do their own thing with phi nodes if they want
...
to. This can be combined with LCSSA or SSI form to store more information on a
PHINode than can be computed by looking at its incoming values.
llvm-svn: 82317
2009-09-19 18:33:36 +00:00
Duncan Sands
6f1a8215c0
The flag "--dot-cfg-only" is at the moment equivalent to the flag "--dot-cfg".
...
It prints the content of all bbs, instead of printing empty bbs to make the
CFG more readable. Fix this. Patch by Tobias Grosser.
llvm-svn: 82315
2009-09-19 11:25:44 +00:00
Evan Cheng
a82b43fb81
Fix funky comments.
...
llvm-svn: 82314
2009-09-19 10:09:15 +00:00
Benjamin Kramer
b8b2ef98f4
Try to speed up the slowest parts of the CommandLine library
...
- Replace std::map<std::string with StringMap
- Eliminate unnecessary std::string copies
- ~10% speed-up for clang's testsuite on my machine (debug build)
llvm-svn: 82312
2009-09-19 10:01:45 +00:00
Evan Cheng
7714c8412d
Fix PR4926. When target hook EmitInstrWithCustomInserter() insert new basic blocks and update CFG, it should also inform sdisel of the changes so the phi source operands will come from the right basic blocks.
...
llvm-svn: 82311
2009-09-19 09:51:03 +00:00
Victor Hernandez
fe5347d782
Enhance transform passes so that they apply the same tranforms to malloc calls as to MallocInst.
...
Reviewed by Dan Gohman.
llvm-svn: 82300
2009-09-18 22:35:49 +00:00
Bob Wilson
0ad3a28b10
Fix a comment typo and some whitespace.
...
llvm-svn: 82285
2009-09-18 21:43:11 +00:00
Bob Wilson
1b311a6a9b
Fix a typo in an assertion message.
...
llvm-svn: 82284
2009-09-18 21:42:44 +00:00
Bill Wendling
5e030245e8
Factor out label difference creation.
...
llvm-svn: 82282
2009-09-18 21:37:56 +00:00
Victor Hernandez
66d4042178
Enhance analysis passes so that they apply the same analysis to malloc calls as to MallocInst.
...
Reviewed by Eli Friedman.
llvm-svn: 82281
2009-09-18 21:34:51 +00:00
Bill Wendling
6ddbe2a6ad
It's inefficient to have place the exception tables (which contain the LSDA)
...
into the __DATA section. At launch time, dyld has to update most of the section
to fix up the type info pointers. It's better to place it into the __TEXT
section and use pc-rel indirect pointer encodings. Similar to the personality
routine.
llvm-svn: 82274
2009-09-18 21:14:36 +00:00
Evan Cheng
7cb9c456e5
Enhance EmitInstrWithCustomInserter() so target can specify CFG changes that sdisel will use to properly complete phi nodes.
...
Not functionality change yet.
llvm-svn: 82273
2009-09-18 21:02:19 +00:00
Shantonu Sen
eedff40e25
Fix cmake build, which has a different -I that
...
causes the "../foo" to not find the file
llvm-svn: 82270
2009-09-18 20:35:59 +00:00
Chris Lattner
60739d60bf
Make a new X8632_MachoTargetObjectFile TLOF implementation whose
...
getSymbolForDwarfGlobalReference is smart enough to know that it
needs to register the stub it references with MachineModuleInfoMachO,
so that it gets emitted at the end of the file.
Move stub emission from X86ATTAsmPrinter::doFinalization to the
new X86ATTAsmPrinter::EmitEndOfAsmFile asmprinter hook. The important
thing here is that EmitEndOfAsmFile is called *after* the ehframes are
emitted, so we get all the stubs.
This allows us to remove a gross hack from the asmprinter where it would
"just know" that it needed to output stubs for personality functions.
Now this is all driven from a consistent interface.
The testcase change is just reordering the expected output now that the
stubs come out after the ehframe instead of before.
This also unblocks other changes that Bill wants to make.
llvm-svn: 82269
2009-09-18 20:22:52 +00:00
Chris Lattner
f50872c2c4
add a new hook to allow targets to splat stuff at the end of the file.
...
Overriding doFinalization is pretty lame.
llvm-svn: 82268
2009-09-18 20:17:03 +00:00
Dale Johannesen
7d68f8de7f
Model the carry bit on ppc32. Without this we could
...
move a SUBFC (etc.) below the SUBFE (etc.) that consumed
the carry bit. Add missing ADDIC8, noticed along the way.
llvm-svn: 82266
2009-09-18 20:15:22 +00:00
Dan Gohman
0dcc5f9922
Add support for using the FLAGS result of or, xor, and and instructions
...
on x86, to avoid explicit test instructions. A few existing tests changed
due to arbitrary register allocation differences.
llvm-svn: 82263
2009-09-18 19:59:53 +00:00
Sean Callanan
498be752e0
Added RCL and RCR (rotate left and right with a
...
carry bit) instructions to the Intel instruction
tables.
llvm-svn: 82260
2009-09-18 19:35:23 +00:00
Devang Patel
c195f74dee
Write and read metadata attachments.
...
llvm-svn: 82259
2009-09-18 19:26:43 +00:00
Victor Hernandez
065bc44d01
Update malloc call creation code (AllocType is now the element type of the malloc, not the resulting type).
...
In getMallocArraySize(), fix bug in the case that array size is the product of 2 constants.
Extend isArrayMalloc() and getMallocArraySize() to handle case where malloc is used as char array.
Ensure that ArraySize in LowerAllocations::runOnBasicBlock() is correct type.
Extend Instruction::isSafeToSpeculativelyExecute() to handle malloc calls.
Add verification for malloc calls.
Reviewed by Dan Gohman.
llvm-svn: 82257
2009-09-18 19:20:02 +00:00
Chris Lattner
288097205f
duncan points out the EH selector values are signed.
...
llvm-svn: 82245
2009-09-18 18:34:29 +00:00
Chris Lattner
b2ccd100fc
This file can need access to the X86 instruction enums when the table exceeds 32-bits.
...
llvm-svn: 82235
2009-09-18 18:08:55 +00:00
Anton Korobeynikov
fb7ac49d96
Allow symbols to start from the digit if target requests it. This allows, e.g. pinning
...
variables to specified absolute address. Make use of this feature for MSP430.
This unbreaks PR4776.
llvm-svn: 82227
2009-09-18 16:57:42 +00:00
Nick Lewycky
6fccd67e2f
Stop using alloca.
...
llvm-svn: 82225
2009-09-18 16:46:16 +00:00
Evan Cheng
479df579a0
Revert r82214. It broke 403.gcc on x86_64 / Darwin.
...
llvm-svn: 82215
2009-09-18 08:26:06 +00:00
Evan Cheng
d1392886c1
Fix a bug in sdisel switch lowering code. When it updates the phi nodes in switch successor blocks, it can introduce multiple phi operands of the same value from different blocks (and may not be on the predecessor list).
...
This can be seen on CodeGen/Generic/2006-09-06-SwitchLowering.ll. But it's not known to cause any real regression (but I have added an assertion for it now).
llvm-svn: 82214
2009-09-18 08:16:04 +00:00
Nick Lewycky
9143d2c7a2
Add newlines.
...
llvm-svn: 82206
2009-09-18 07:36:47 +00:00
Chris Lattner
7c218a0238
tolerate llvm.eh.selector.i64 on 32-bit systems and llvm.eh.selector.i32 on
...
64-bit systems.
llvm-svn: 82180
2009-09-17 23:54:54 +00:00
Devang Patel
d90471a00d
Fix parsing of optional metadata for 'load', 'store' and 'alloc' instructions.
...
llvm-svn: 82175
2009-09-17 23:04:48 +00:00
Chris Lattner
be5afd41e3
pass machinemoduleinfo down into getSymbolForDwarfGlobalReference,
...
currently unused.
llvm-svn: 82157
2009-09-17 18:49:52 +00:00
Dan Gohman
723717853b
Teach ScalarEvolution how to reason about no-wrap flags on loops
...
where the induction variable has a non-unit stride, such as {0,+,2}, and
there are expressions such as {1,+,2} inside the loop formed with
or or add nsw operators.
llvm-svn: 82151
2009-09-17 18:05:20 +00:00
Jim Grosbach
6d6f3ded0b
grammar
...
llvm-svn: 82150
2009-09-17 17:57:26 +00:00
Benjamin Kramer
b1d15dcefe
Initialize HasMetadata to zero.
...
llvm-svn: 82145
2009-09-17 14:51:57 +00:00
Evan Cheng
491d179d97
Remove simple regalloc. It has bit rotted.
...
llvm-svn: 82127
2009-09-17 05:48:07 +00:00
Chris Lattner
09084c45af
add a version of the APFloat constructor that initializes to 0.0
...
llvm-svn: 82110
2009-09-17 01:08:43 +00:00
Evan Cheng
218f882aff
Fix PR4910: Broken logic in coalescer means when a physical register liveness is being shortened, the sub-registers were not. The symptom is the register allocator could not find a free register for this particular test.
...
llvm-svn: 82108
2009-09-17 00:57:15 +00:00
Daniel Dunbar
c688e9b700
Some platforms may need malloc.h for alloca.
...
llvm-svn: 82100
2009-09-17 00:14:44 +00:00