Jakob Stoklund Olesen
665aa6efcc
When isel is emitting instructions for an x86 target without CMOV, the CFG is
...
edited during emission.
If the basic block ends in a switch that gets lowered to a jump table, any
phis at the default edge were getting updated wrong. The jump table data
structure keeps a pointer to the header blocks that wasn't getting updated
after the MBB is split.
This bug was exposed on 32-bit Linux when disabling critical edge splitting in
codegen prepare.
The fix is to uipdate stale MBB pointers whenever a block is split during
emission.
llvm-svn: 115191
2010-09-30 19:44:31 +00:00
Devang Patel
bea08d1c85
Let FE mark a variable as artificial variable.
...
llvm-svn: 115102
2010-09-29 23:07:21 +00:00
Evan Cheng
4a010fd1ea
Model Cortex-a9 load to SUB, RSB, ADD, ADC, SBC, RSC, CMN, MVN, or CMP
...
pipeline forwarding path.
llvm-svn: 115098
2010-09-29 22:42:35 +00:00
Benjamin Kramer
2016f0eaac
Silence msvc warnings.
...
llvm-svn: 115097
2010-09-29 22:38:50 +00:00
Devang Patel
cb03b14089
Add support to let FE encode method access specifier.
...
llvm-svn: 115089
2010-09-29 21:44:16 +00:00
Owen Anderson
0cd522428c
UnreachableBlockElim could incorrectly return false when it had not modified the CFG, but HAD modified some PHI nodes. Fixes PR8174.
...
llvm-svn: 115083
2010-09-29 20:57:19 +00:00
Devang Patel
a1bd5a1fad
Assign DW_ACCESS_public accessibility attribute to members by default.
...
llvm-svn: 115067
2010-09-29 19:08:08 +00:00
Bill Wendling
b0b2c57149
Revert r114997. It was causing a failure on darwin10-selfhost.
...
llvm-svn: 115002
2010-09-28 23:11:55 +00:00
Oscar Fuentes
b4b12535e8
Removed a bunch of unnecessary target_link_libraries.
...
llvm-svn: 114999
2010-09-28 22:39:14 +00:00
Bill Wendling
d848beb1e5
Fix a FIXME. _foo.eh symbols are currently always exported so that the linker
...
knows about them. This is not necessary on 10.6 and later.
llvm-svn: 114997
2010-09-28 22:36:56 +00:00
Owen Anderson
1b35f4cc66
Give the if-converter access to MachineLoopInfo, and use it to generate plausible branch prediction
...
estimates.
llvm-svn: 114981
2010-09-28 20:42:15 +00:00
Owen Anderson
88af7d00fc
Part one of switching to using a more sane heuristic for determining if-conversion profitability.
...
Rather than having arbitrary cutoffs, actually try to cost model the conversion.
For now, the constants are tuned to more or less match our existing behavior, but these will be
changed to reflect realistic values as this work proceeds.
llvm-svn: 114973
2010-09-28 18:32:13 +00:00
Devang Patel
7a55481fa4
Provide an interface to let FEs anchor debug info for types.
...
llvm-svn: 114969
2010-09-28 18:08:20 +00:00
Devang Patel
185051cb8e
Remove dead argument.
...
llvm-svn: 114920
2010-09-27 23:15:27 +00:00
Dale Johannesen
117f7708c4
Don't try to make a vector of x86mmx; this won't work,
...
and asserts.
llvm-svn: 114843
2010-09-27 17:29:14 +00:00
Chris Lattner
9f06f911d1
the latest assembler that runs on powerpc 10.4 machines doesn't
...
support aligned comm. Detect when compiling for 10.4 and don't
emit an alignment for comm. THis will hopefully fix PR8198.
llvm-svn: 114817
2010-09-27 06:44:54 +00:00
Lang Hames
c8a4973389
Fixed some tests to avoid LiveIntervals::getInstructionFromIndex(..) overhead where possible. Thanks to Jakob for the suggestions.
...
llvm-svn: 114798
2010-09-26 03:37:09 +00:00
Jakob Stoklund Olesen
10117c762a
Avoid using VNInfo::getCopy as much as possible. I want to get rid of it.
...
llvm-svn: 114794
2010-09-25 18:10:38 +00:00
Lang Hames
564956867e
Removed VNInfo::isDefAccurate(). Def "accuracy" can be checked by testing whether LiveIntervals::getInstructionFromIndex(def) returns NULL.
...
llvm-svn: 114791
2010-09-25 12:04:16 +00:00
Jakob Stoklund Olesen
bc71af341e
Remove SlotIndex::PHI_BIT. It is no longer used by anything.
...
llvm-svn: 114779
2010-09-25 00:45:18 +00:00
Jakob Stoklund Olesen
250fed25fd
Remove the only use of SlotIndex::isPHI. This bit is not being set consistently
...
and it will be removed shortly.
llvm-svn: 114778
2010-09-25 00:45:15 +00:00
Jakob Stoklund Olesen
335b9a8ea9
Terminator gaps were unused. Might as well delete them.
...
llvm-svn: 114776
2010-09-24 23:58:56 +00:00
John Thompson
8118ef8d3d
Fix for test/CodeGen/PowerPC/2008-10-17-AsmMatchingOperands.ll crash.
...
llvm-svn: 114767
2010-09-24 22:24:05 +00:00
Michael J. Spencer
ded5f66813
Get rid of pop_macro warnings on MSVC.
...
llvm-svn: 114750
2010-09-24 19:48:47 +00:00
Nicolas Geoffray
cbb421887d
Attach a DebugLoc to a GC point in order to get precise information in the JIT of a GC point.
...
llvm-svn: 114736
2010-09-24 17:27:50 +00:00
Evan Cheng
6b8b2b7312
Revert 114634 for now since buildbot claim it broke Clang self-hosting. I doubt it but it's possible it's exposing another bug somewhere.
...
llvm-svn: 114681
2010-09-23 18:32:19 +00:00
Oscar Fuentes
57214f533a
Fix VS 2010 build.
...
Patch by Nathan Jeffords!
llvm-svn: 114661
2010-09-23 16:59:36 +00:00
Evan Cheng
b6d175a39d
Follow up to r114630. Do not optimize away unconditional branch following a conditional one.
...
llvm-svn: 114634
2010-09-23 07:18:35 +00:00
Evan Cheng
d4b31a7630
Don't sink insert_subreg, subreg_to_reg, reg_sequence. They are meant to be
...
close to their sources to facilitate coalescing.
llvm-svn: 114631
2010-09-23 06:53:00 +00:00
Evan Cheng
79687dda9a
SDISel should not optimize a unconditional branch following a conditional branch
...
when the unconditional branch destination is the fallthrough block. The
canonicalization makes it easier to allow optimizations on DAGs to invert
conditional branches. The branch folding pass (and AnalyzeBranch) will clean up
the unnecessary unconditional branches later.
This is one of the patches leading up to disabling codegen prepare critical edge
splitting.
llvm-svn: 114630
2010-09-23 06:51:55 +00:00
Lang Hames
fd1bc42230
Moved the PBQP allocator class out of the header and back in to the cpp file to hide the gory details.
...
Allocator instances can now be created by calling createPBQPRegisterAllocator.
Tidied up use of CoalescerPair as per Jakob's suggestions.
Made the new PBQPBuilder based construction process the default. The internal construction process
remains in-place and available via -pbqp-builder=false for now. It will be removed shortly if the new
process doesn't cause any regressions.
llvm-svn: 114626
2010-09-23 04:28:54 +00:00
Owen Anderson
3231d13ddd
A select between a constant and zero, when fed by a bit test, can be efficiently
...
lowered using a series of shifts.
Fixes <rdar://problem/8285015>.
llvm-svn: 114599
2010-09-22 22:58:22 +00:00
Devang Patel
804fcd4794
Use DW_OP_fbreg when offset is based on frame register.
...
llvm-svn: 114585
2010-09-22 21:10:38 +00:00
Jakob Stoklund Olesen
6f8bd42ec7
Build the complement interval dupli after the split intervals instead of
...
creating it before and subtracting split ranges.
This way, the SSA update code in LiveIntervalMap can properly create and use new
phi values in dupli. Now it is possible to create split regions where a value
escapes along two different CFG edges, creating phi values outside the split
region.
This is a work in progress and probably quite broken.
llvm-svn: 114492
2010-09-21 22:32:21 +00:00
John Thompson
c467aa2fa4
Fixed pr20314-2.c failure, added E, F, p constraint letters.
...
llvm-svn: 114490
2010-09-21 22:04:54 +00:00
Chris Lattner
a9e57e0eff
Rework passing parent pointers into complexpatterns, I forgot
...
that complex patterns are matched after the entire pattern has
a structural match, therefore the NodeStack isn't in a useful
state when the actual call to the matcher happens.
llvm-svn: 114489
2010-09-21 22:00:25 +00:00
Devang Patel
99ff76212a
If only user of a vreg is an copy instruction to export copy of vreg out of current basic block then insert DBG_VALUE so that debug value of the variable is also transfered to new vreg.
...
Testcase is in r114476.
This fixes radar 8412415.
llvm-svn: 114478
2010-09-21 20:56:33 +00:00
Chris Lattner
0bb8b19865
correct this logic.
...
llvm-svn: 114474
2010-09-21 20:46:40 +00:00
Owen Anderson
5e65dfbb97
Reimplement r114460 in target-independent DAGCombine rather than target-dependent, by using
...
the predicate to discover the number of sign bits. Enhance X86's target lowering to provide
a useful response to this query.
llvm-svn: 114473
2010-09-21 20:42:50 +00:00
Chris Lattner
dd83548fea
just like they can opt into getting the root of the pattern being
...
matched, allow ComplexPatterns to opt into getting the parent node
of the operand being matched.
llvm-svn: 114472
2010-09-21 20:37:12 +00:00
Jakob Stoklund Olesen
beb64f55cf
Refix MSVC9 and upper_bound. It actually needs a fully symmetric comparator.
...
llvm-svn: 114469
2010-09-21 20:16:12 +00:00
Chris Lattner
a4f199720d
finish pushing MachinePointerInfo through selectiondags. At this point,
...
I think I've audited all uses, so it should be dependable for address spaces,
and the pointer+offset info should also be accurate when there.
llvm-svn: 114464
2010-09-21 18:58:22 +00:00
Chris Lattner
886250c8f0
convert a couple more places to use the new getStore()
...
llvm-svn: 114463
2010-09-21 18:51:21 +00:00
Chris Lattner
676c61db0e
update a bunch of code to use the MachinePointerInfo version of getStore.
...
llvm-svn: 114461
2010-09-21 18:41:36 +00:00
Jakob Stoklund Olesen
f7a8e93b76
Don't pollute the global namespace.
...
llvm-svn: 114459
2010-09-21 18:34:17 +00:00
Jakob Stoklund Olesen
25a123df85
MSVC9 does not support upper_bound with an asymmetric comparator.
...
llvm-svn: 114455
2010-09-21 18:24:30 +00:00
Bob Wilson
5549d496dd
Define the TargetLowering::getTgtMemIntrinsic hook for ARM so that NEON load
...
and store intrinsics are represented with MemIntrinsicSDNodes.
llvm-svn: 114454
2010-09-21 17:56:22 +00:00
Chris Lattner
6963c1f789
eliminate an old SelectionDAG::getTruncStore method, propagating
...
MachinePointerInfo around more.
llvm-svn: 114452
2010-09-21 17:42:31 +00:00
Chris Lattner
5e39ffd02f
eliminate last SelectionDAG::getLoad old entrypoint, on to stores.
...
llvm-svn: 114450
2010-09-21 17:28:52 +00:00
Chris Lattner
ea952f05a5
fix the code that infers SV info to be correct when dealing
...
with an indexed load/store that has an offset in the index.
llvm-svn: 114449
2010-09-21 17:24:05 +00:00