1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
Commit Graph

8455 Commits

Author SHA1 Message Date
Bob Wilson
e79354a831 Print VMOV (immediate) operands as hexadecimal values. Apple's assembler
will not accept negative values for these.  LLVM's default operand printing
sign extends values, so that valid unsigned values appear as negative
immediates.  Print all VMOV immediate operands as hex values to resolve this.
Radar 7372576.

llvm-svn: 86301
2009-11-06 23:33:28 +00:00
Bob Wilson
68772d4db2 Fix a broken test.
llvm-svn: 86298
2009-11-06 23:06:42 +00:00
Evan Cheng
aaf30ce699 Remove ARMPCLabelIndex from ARMISelLowering. Use ARMFunctionInfo::createConstPoolEntryUId() instead.
llvm-svn: 86294
2009-11-06 22:24:13 +00:00
Gabor Greif
b0c347888a fix typo
llvm-svn: 86281
2009-11-06 20:10:46 +00:00
Chris Lattner
93a3e74486 Fix a problem discovered on self host.
llvm-svn: 86278
2009-11-06 19:21:48 +00:00
Devang Patel
1a557eacb8 Tolerate invalid derived type.
llvm-svn: 86269
2009-11-06 18:24:05 +00:00
Chris Lattner
b688868418 Extend jump threading to support much more general threading
predicates.  This allows us to jump thread things like:

_ZN12StringSwitchI5ColorE4CaseILj7EEERS1_RAT__KcRKS0_.exit119:
  %tmp1.i24166 = phi i8 [ 1, %bb5.i117 ], [ %tmp1.i24165, %_Z....exit ], [ %tmp1.i24165, %bb4.i114 ] 
  %toBoolnot.i87 = icmp eq i8 %tmp1.i24166, 0     ; <i1> [#uses=1]
  %tmp4.i90 = icmp eq i32 %tmp2.i, 6              ; <i1> [#uses=1]
  %or.cond173 = and i1 %toBoolnot.i87, %tmp4.i90  ; <i1> [#uses=1]
  br i1 %or.cond173, label %bb4.i96, label %_ZN12...

Where it is "obvious" that when coming from %bb5.i117 that the 'and' is always 
false.  This triggers a surprisingly high number of times in the testsuite, 
and gets us closer to generating good code for doug's strswitch testcase.

This also make a bunch of other code in jump threading redundant, I'll rip
out in the next patch.  This survived an enable-checking llvm-gcc bootstrap.

llvm-svn: 86264
2009-11-06 18:15:14 +00:00
Devang Patel
0d1f6a9d0e Do not bother to emit debug info for nameless global variable.
llvm-svn: 86259
2009-11-06 17:58:12 +00:00
Victor Hernandez
a5a12cd62e Revert r86077 because it caused crashes in 179.art and 175.vpr on ARM
llvm-svn: 86213
2009-11-06 01:33:24 +00:00
Devang Patel
5035033346 Do not try to emit debug info entry for dead global variable.
llvm-svn: 86212
2009-11-06 01:30:04 +00:00
Eric Christopher
593cfc9984 Fix PR5315, original patch by Nicolas Capens!
llvm-svn: 86203
2009-11-06 00:11:57 +00:00
Dan Gohman
229f9edf7a Update these tests for the new label names.
llvm-svn: 86192
2009-11-05 23:31:40 +00:00
Dan Gohman
f65735f0c5 The introduction of indirectbr meant the introduction of
unsplittable critical edges, which means the introduction of
loops which cannot be transformed to LoopSimplify form. Fix
LoopSimplify to avoid transforming such loops into invalid
code.

llvm-svn: 86176
2009-11-05 21:14:46 +00:00
Benjamin Kramer
a38019a3de Teach SimplifyLibCalls to fold memcmp calls with constant arguments.
llvm-svn: 86141
2009-11-05 17:44:22 +00:00
Chris Lattner
412e9dc6fc merge a few crash tests into crash.ll
llvm-svn: 86119
2009-11-05 05:57:34 +00:00
Bob Wilson
641ce17702 Add -mtriple to llc commands, attempting to fix buildbot failures.
llvm-svn: 86086
2009-11-05 00:51:31 +00:00
Bob Wilson
d14be3d83c Attempt again to fix buildbot failures: make expected output less specific
and compile with -mtriple to specify *-apple-darwin targets.

llvm-svn: 86081
2009-11-05 00:30:35 +00:00
Victor Hernandez
21ec158c23 Update CreateMalloc so that its callers specify the size to allocate:
MallocInst-autoupgrade users use non-TargetData-computed allocation sizes.
Optimization uses use TargetData to compute the allocation size.

Now that malloc calls can have constant sizes, update isArrayMallocHelper() to use TargetData to determine the size of the malloced type and the size of malloced arrays.
Extend getMallocType() to support malloc calls that have non-bitcast uses.

Update OptimizeGlobalAddressOfMalloc() to optimize malloc calls that have non-bitcast uses.  The bitcast use of a malloc call has to be treated specially here because the uses of the bitcast need to be replaced and the bitcast needs to be erased (just like the malloc call) for OptimizeGlobalAddressOfMalloc() to work correctly.

Update PerformHeapAllocSRoA() to optimize malloc calls that have non-bitcast uses.  The bitcast use of the malloc is not handled specially here because ReplaceUsesOfMallocWithGlobal replaces through the bitcast use.

Update OptimizeOnceStoredGlobal() to not care about the malloc calls' bitcast use.

Update all globalopt malloc tests to not rely on autoupgraded-MallocInsts, but instead use explicit malloc calls with correct allocation sizes.

llvm-svn: 86077
2009-11-05 00:03:03 +00:00
Chris Lattner
a003aee613 improve DSE when TargetData is not around, based on work by
Hans Wennborg!

llvm-svn: 86067
2009-11-04 23:20:12 +00:00
Bob Wilson
25738f9e79 Add PowerPC codegen for indirect branches.
llvm-svn: 86050
2009-11-04 21:31:18 +00:00
Bob Wilson
9e30ecad4e Fix broken test.
llvm-svn: 86045
2009-11-04 20:04:11 +00:00
Bob Wilson
ca42ca296d Add test for ARM indirectbr codegen.
llvm-svn: 86042
2009-11-04 19:25:34 +00:00
Evan Cheng
801415706c RangeIsDefinedByCopyFromReg() should check for subreg_to_reg, insert_subreg,
and extract_subreg as a "copy" that defines a valno.
Also fixes a typo. These two issues prevent a simple subreg coalescing from
happening before.

llvm-svn: 86022
2009-11-04 08:33:14 +00:00
Chris Lattner
d8ab8fbe9f move two functions up higher in the file. Delete a useless argument
to EmitGEPOffset.  

Implement some new transforms for optimizing 
subtracts of two pointer to ints into the same vector.  This happens
for C++ iterator idioms for example, stringmap takes a const char*
that points to the start and end of a string.  Once inlined, we want
the pointer difference to turn back into a length.

This is rdar://7362831.

llvm-svn: 86021
2009-11-04 08:05:20 +00:00
Chris Lattner
aede55dc9b filecheckize this test.
llvm-svn: 86020
2009-11-04 07:57:05 +00:00
Evan Cheng
8b161e8f4f Fix test.
llvm-svn: 85986
2009-11-04 00:42:33 +00:00
Chris Lattner
b634c6cdb5 reimplement multiple return value handling in IPSCCP, making it
more aggressive an correct.  This survives building llvm in 64-bit
mode with optimizations and the built llvm passes make check.

llvm-svn: 85973
2009-11-03 23:40:48 +00:00
Evan Cheng
caab17007b fconsts / fconstd immediate should be proceeded with #.
llvm-svn: 85952
2009-11-03 21:59:33 +00:00
Evan Cheng
d783406059 Re-apply 85799. It turns out my code isn't buggy.
llvm-svn: 85947
2009-11-03 21:40:02 +00:00
Chris Lattner
036e15ff97 fix test
llvm-svn: 85946
2009-11-03 21:26:26 +00:00
Chris Lattner
11eafaadc3 merge a test into ipsccp-basic. running llvm-ld to get one pass is... bad.
llvm-svn: 85945
2009-11-03 21:25:50 +00:00
Chris Lattner
3ea71a58aa turn IPSCCP back on by default, try #3 or 4? Woo.
llvm-svn: 85929
2009-11-03 19:35:13 +00:00
Chris Lattner
2aa5962af6 fix an IPSCCP bug I introduced when I changed IPSCCP to start working on
functions that don't have local linkage.  Basically, we need to be more
careful about propagating argument information to functions whose results
we aren't tracking.  This fixes a miscompilation of 
LLVMCConfigurationEmitter.cpp when built with an llvm-gcc that has ipsccp
enabled.

llvm-svn: 85923
2009-11-03 19:24:51 +00:00
Devang Patel
5b0aaf3a1f Parse debug info attached with insertvalue and extractvalue instructions.
llvm-svn: 85921
2009-11-03 19:06:07 +00:00
Chris Lattner
cac8f54197 xfail this test since daniel turned off ipsccp
llvm-svn: 85907
2009-11-03 17:54:12 +00:00
Chris Lattner
15ceb6e7f7 testcase for r85903
llvm-svn: 85906
2009-11-03 17:03:02 +00:00
Kenneth Uildriks
e711736014 Make opt default to not adding a target data string and update tests that depend on target data to supply it within the test
llvm-svn: 85900
2009-11-03 15:29:06 +00:00
Evan Cheng
ed22395c61 Fix PR5367. QPR_8 is the super regclass of DPR_8 and SPR_8.
llvm-svn: 85871
2009-11-03 05:52:54 +00:00
Nate Begeman
52bcd33312 Declare sin & cos as readonly so they match the code in SelectionDAGBuild
llvm-svn: 85853
2009-11-03 02:19:31 +00:00
Anton Korobeynikov
bce2703f18 Temporary xfail until PR5367 will be resolved
llvm-svn: 85848
2009-11-03 00:37:36 +00:00
Anton Korobeynikov
48b30c79be Revert r85049, it is causing PR5367
llvm-svn: 85847
2009-11-03 00:24:48 +00:00
Evan Cheng
ca5847665b Revert 85799 for now. It might be breaking llvm-gcc driver.
llvm-svn: 85827
2009-11-02 21:49:14 +00:00
Chris Lattner
fc4e63b285 merge 2008-03-10-sret.ll into ipsccp-basic.ll, and upgrade its syntax.
llvm-svn: 85811
2009-11-02 18:27:22 +00:00
Chris Lattner
a1776913ab disable IPSCCP support for multiple return values, it is buggy, so just
disable it until I can fix it.

llvm-svn: 85810
2009-11-02 18:22:51 +00:00
Evan Cheng
ec5cb0cdbd Initilize the machine LICM CSE map upon the first time an instruction is hoisted to
the loop preheader. Add instructions which are already in the preheader block that
may be common expressions of those that are hoisted out. These does get a few more
instructions CSE'ed.

llvm-svn: 85799
2009-11-02 08:09:49 +00:00
Chris Lattner
f1afb57935 improve IPSCCP to be able to propagate the result of "!mayBeOverridden"
function to calls of that function, regardless of whether it has local
linkage or has its address taken.  Not escaping should only affect 
whether we make an aggressive assumption about the arguments to a 
function, not whether we can track the result of it.

llvm-svn: 85795
2009-11-02 07:33:59 +00:00
Evan Cheng
ce9d8e2737 Remove an irrelevant and poorly reduced test case.
llvm-svn: 85794
2009-11-02 07:11:54 +00:00
Chris Lattner
16b825e51f Use the libanalysis 'ConstantFoldLoadFromConstPtr' function
instead of reinventing SCCP-specific logic.  This gives us
new powers.

llvm-svn: 85789
2009-11-02 06:06:14 +00:00
Evan Cheng
57f7c7c914 Unbreak ARMBaseRegisterInfo::copyRegToReg.
llvm-svn: 85787
2009-11-02 04:44:55 +00:00
Chris Lattner
9fc809ca55 fix a bug exposed by moving SRoA earlier which caused a crash building kc++
llvm-svn: 85786
2009-11-02 04:37:17 +00:00