Jay Foad
24a01962af
Use cast<> instead of a C-style cast to get some free assertions.
...
llvm-svn: 136771
2011-08-03 10:05:04 +00:00
Chris Lattner
5b82a0ac0c
fix PR10286, a problem with the .ll printer handling block addresses that are out-of-scope.
...
llvm-svn: 136768
2011-08-03 06:15:41 +00:00
Devang Patel
dc9cbaaf23
Use byte offset, instead of element number, to access merged global.
...
llvm-svn: 136759
2011-08-03 01:25:46 +00:00
Nick Lewycky
d405b7e2ae
Small cleanups:
...
- use SmallVectorImpl& for the function argument.
- ignore the operands on the GEP, even if they aren't constant! Much as we
pretend the malloc succeeds, we pretend that malloc + whatever-you-GEP'd-by
is not null. It's magic!
llvm-svn: 136757
2011-08-03 01:11:40 +00:00
Bill Wendling
035ea32870
Add this back in for now. There are still a few passes which create unwind instructions at the moment.
...
llvm-svn: 136756
2011-08-03 01:07:57 +00:00
Nick Lewycky
50f4966ceb
Fix logical error when detecting lifetime intrinsics.
...
Don't replace a gep/bitcast with 'undef' because that will form a "free(undef)"
which in turn means "unreachable". What we wanted was a no-op. Instead, analyze
the whole tree and look for all the instructions we need to delete first, then
delete them second, not relying on the use_list to stay consistent.
llvm-svn: 136752
2011-08-03 00:43:35 +00:00
Bill Wendling
ae3380faff
Replace the 'UnwindInst' check with a check for 'ResumeInst', which also exits
...
the function, because the UnwindInst is going away.
llvm-svn: 136751
2011-08-03 00:30:19 +00:00
Jakob Stoklund Olesen
3c14505164
Use the precomputed def presence in RAGreedy::calcSpillCost.
...
llvm-svn: 136742
2011-08-02 23:04:08 +00:00
Jakob Stoklund Olesen
057f9b68de
Inform SpillPlacement about blocks with defs.
...
This information is not used for anything yet.
llvm-svn: 136741
2011-08-02 23:04:06 +00:00
Jakob Stoklund Olesen
43859a6ad2
Rename {First,Last}Use to {First,Last}Instr.
...
With a 'FirstDef' field right there, it is very confusing that FirstUse
refers to an instruction that may be a def.
llvm-svn: 136739
2011-08-02 22:54:14 +00:00
Evan Cheng
fd7f6c9438
lldb doesn't need the edis dylib any more.
...
llvm-svn: 136738
2011-08-02 22:53:48 +00:00
Eli Friedman
5c863aeefd
ARM backend support for atomicrmw and cmpxchg with non-monotonic ordering. Not especially pretty, but seems to work well enough. If this looks okay, I'll put together similar patches for Mips, PPC, and Alpha.
...
llvm-svn: 136737
2011-08-02 22:44:16 +00:00
Jakob Stoklund Olesen
ae8027cc95
Add a BlockInfo::FirstDef field.
...
This is either an invalid SlotIndex, or valno->def for the first value
defined inside the block. PHI values are not counted as defined inside
the block.
The FirstDef field will be used when estimating the cost of spilling
around a block.
llvm-svn: 136736
2011-08-02 22:37:22 +00:00
Jakob Stoklund Olesen
f047ff4fe1
Delete BlockInfo::LiveThrough. It wasn't used any more.
...
llvm-svn: 136735
2011-08-02 22:37:20 +00:00
Nick Lewycky
e8ae02dfb9
Teach InstCombine that lifetime intrincs aren't a real user on the result of a
...
malloc call.
llvm-svn: 136732
2011-08-02 22:08:01 +00:00
Jakob Stoklund Olesen
d2a7d1ed97
Extend the SpillPlacement interface with two new features.
...
The PrefBoth constraint is used for blocks that ideally want a live-in
value both on the stack and in a register. This would be used by a block
that has a use before interference forces a spill.
Secondly, add the ChangesValue flag to BlockConstraint. This tells
SpillPlacement if a live-in value on the stack can be reused as a
live-out stack value for free. If the block redefines the virtual
register, a spill would be required for that.
This extra information will be used by SpillPlacement to more accurately
calculate spill costs when a value can exist both on the stack and in a
register.
The simplest example is a basic block that reads the virtual register,
but doesn't change its value. Spilling around such a block requires a
reload, but no spill in the block.
The spiller already knows this, but the spill placer doesn't. That can
sometimes lead to suboptimal regions.
llvm-svn: 136731
2011-08-02 21:53:03 +00:00
Bill Wendling
bbcb7cde34
Add the documentation for the 'landingpad' instruction. Improve the 'invoke'
...
instruction's documentation to reference the landingpad and resume instructions.
llvm-svn: 136729
2011-08-02 21:52:38 +00:00
Rafael Espindola
3ea478b7ac
Move methods in PassManagerBuilder offline.
...
llvm-svn: 136727
2011-08-02 21:50:27 +00:00
Rafael Espindola
591eaa481e
move PassManagerBuilder.h to IPO. This is a non intuitive place to put it,
...
but it solves a layering violation since things in Support are not supposed to
use things in Transforms.
llvm-svn: 136726
2011-08-02 21:50:24 +00:00
Eli Friedman
366bccefad
Add new atomic instructions to SCCP. No functional change, but stops debug spam.
...
llvm-svn: 136723
2011-08-02 21:35:16 +00:00
Nick Lewycky
99890a225f
Lifetime intrinsics on undef are dead.
...
llvm-svn: 136722
2011-08-02 21:19:27 +00:00
Chad Rosier
8c9d9b2f0f
Update the default bug report url in autoconf.
...
llvm-svn: 136721
2011-08-02 20:53:43 +00:00
Chris Lattner
d3d65ab791
no need to count the terminators.
...
llvm-svn: 136718
2011-08-02 20:29:13 +00:00
Rafael Espindola
c48e10cd54
Assume .cfi_startproc is the first thing in a function. If the function is
...
externally visable, create a local symbol to use in the CFE. If not, use the
function label itself.
Fixes PR10420.
llvm-svn: 136716
2011-08-02 20:24:22 +00:00
Eli Friedman
04c5025cd5
Don't create a ridiculous EXTRACT_ELEMENT. PR10563.
...
The testcase looks extremely fragile, so I'm adding an assertion which should catch any cases like this.
llvm-svn: 136711
2011-08-02 18:38:35 +00:00
Owen Anderson
713406f88d
Fix the broken encodings for the VFP vmov.f32 and vmov.f64 instructions, as well as the comments that explain them incorrectly.
...
llvm-svn: 136707
2011-08-02 18:30:00 +00:00
Jim Grosbach
c8c63914c5
Tidy up. 80 columns.
...
llvm-svn: 136705
2011-08-02 18:16:36 +00:00
Jim Grosbach
9ec152b6bf
ARM: rename addrmode7 to addr_offset_none.
...
Use a more descriptive name so the code is more self-documenting.
llvm-svn: 136704
2011-08-02 18:07:32 +00:00
Roman Divacky
11a044634a
Comment out the PPC relocation offset adjustment. It must be done differently.
...
This unbreaks some tests.
llvm-svn: 136692
2011-08-02 16:15:32 +00:00
Bruno Cardoso Lopes
5ada908140
Make this kind of lowering to be supported by 256-bit instructions:
...
shuffle (scalar_to_vector (load (ptr + 4))), undef, <0, 0, 0, 0>
To:
shuffle (vload ptr)), undef, <1, 1, 1, 1>
Fix PR10494
llvm-svn: 136691
2011-08-02 16:06:18 +00:00
Roman Divacky
e6a11dcc72
Remove trailing semicolon.
...
llvm-svn: 136690
2011-08-02 15:54:03 +00:00
Roman Divacky
038c1a1a73
Sketch out PowerPC ELF writer. This is enough to get clang -integrated-as
...
to compile a working hello world on FreeBSD/PPC32.
llvm-svn: 136689
2011-08-02 15:51:38 +00:00
Bill Wendling
6bc7caa334
Duncan's english is better than mine. :-)
...
llvm-svn: 136684
2011-08-02 06:39:13 +00:00
Bill Wendling
46ffaa95bd
Remove the LLVMBuildUnwind C API function.
...
The 'unwind' function is going away with the new EH rewrite. This is step 0 in
keeping front-ends from using it.
llvm-svn: 136683
2011-08-02 06:20:17 +00:00
Andrew Trick
77c55428fa
Use consistent terminology for loop exit/exiting blocks. Name change only.
...
llvm-svn: 136677
2011-08-02 04:23:35 +00:00
Benjamin Kramer
c4189ff0fc
Remove empty test.
...
llvm-svn: 136675
2011-08-02 02:47:45 +00:00
Owen Anderson
bddf40e082
Revert r136503 and r136480 in an effort to fix non-determinism in the llvm-gcc buildbots on i386. Devang is looking into the root cause.
...
llvm-svn: 136674
2011-08-02 02:23:42 +00:00
John McCall
c26ea5a51a
I am the code owner for Clang's IR generation; this has been true
...
for awhile, but it's good to make this official.
Just to be clear, Doug and Ted "elected" me to this position.
Might as well add myself to the credits list while I'm at it.
llvm-svn: 136673
2011-08-02 01:38:19 +00:00
Eli Friedman
4bc9f3c174
Minor wording tweak for memory model.
...
llvm-svn: 136668
2011-08-02 01:15:34 +00:00
Eli Friedman
8d468f88a2
Fix a couple silly typos in IRBuilder in the new atomic instructions.
...
llvm-svn: 136665
2011-08-02 00:45:35 +00:00
Nick Lewycky
a530a4d925
Bail from FastISel when we encounter a volatile memset intrinsic. Patch by Ivan
...
Krasin!
llvm-svn: 136663
2011-08-02 00:40:16 +00:00
Owen Anderson
3022d6711d
Make the FixedLengthDecoderEmitter smart enough to autogenerate decoders for encodings like "let Inst{11-7} = foo;", where the RHS has no bitwidth specifiers.
...
llvm-svn: 136660
2011-08-01 22:45:43 +00:00
Jim Grosbach
9f620a6883
Move imm0_255 to ARMInstrInfo.td with the other immediate predicates.
...
llvm-svn: 136656
2011-08-01 22:02:20 +00:00
Jim Grosbach
0f731b3232
Fix comments.
...
llvm-svn: 136655
2011-08-01 21:55:12 +00:00
Bruno Cardoso Lopes
a8e3673816
Add v4f64 -> v2f32 fp_round support. Also add a testcase to exercise
...
the legalizer. This commit together with the two previous ones fixes
PR10495.
llvm-svn: 136654
2011-08-01 21:54:09 +00:00
Bruno Cardoso Lopes
616fe60548
Teach PreprocessISelDAG to be aware of vector types and to not process them.
...
llvm-svn: 136653
2011-08-01 21:54:05 +00:00
Bruno Cardoso Lopes
bd30a4b584
Lower CONCAT_VECTORS to use two VINSERTF128 instructions instead of
...
using a stack store.
llvm-svn: 136652
2011-08-01 21:54:02 +00:00
Roman Divacky
2fbb48ae20
Fix a typo.
...
llvm-svn: 136646
2011-08-01 20:38:27 +00:00
Owen Anderson
faee2cf9ff
The FixedLenDecoder needs to gracefully handle failing per-instruction decoder hooks in addition to per-operand decoder hooks.
...
llvm-svn: 136645
2011-08-01 20:06:49 +00:00
Chandler Carruth
c099a6f9ce
Actually finish switching to the new system for Target sublibrary
...
TableGen deps introduced in r136023. This completes the fixing that
dgregor started in r136621. Sorry for missing these the first time
around.
This should fix some of the random race-condition failures people are
still seeing with CMake.
llvm-svn: 136643
2011-08-01 19:55:11 +00:00