1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

38865 Commits

Author SHA1 Message Date
Chris Lattner
4c1ffef5af we compile multiply-by-constant into horrible code. Doesn't sse4 have some
instruction for doing this?

llvm-svn: 51473
2008-05-23 04:29:53 +00:00
Nick Lewycky
427209006f Implement X + X for vectors.
llvm-svn: 51472
2008-05-23 04:14:51 +00:00
Nick Lewycky
e62259c369 Fix a recently added optimization to not crash on vectors.
llvm-svn: 51471
2008-05-23 03:26:47 +00:00
Dan Gohman
67e1a58e22 Generalize the new code in instcombine's ComputeNumSignBits for handling
and/or to handle more cases (such as this add-sitofp.ll testcase), and
port it to selectiondag's ComputeNumSignBits.

llvm-svn: 51469
2008-05-23 02:28:01 +00:00
Dan Gohman
c7007dd0dc Make structs and arrays first-class types, and add assembly
and bitcode support for the extractvalue and insertvalue
instructions and constant expressions.

Note that this does not yet include CodeGen support.

llvm-svn: 51468
2008-05-23 01:55:30 +00:00
Dan Gohman
eafccb7d8f Use isSingleValueType instead of isFirstClassType to
exclude struct and array types.

llvm-svn: 51467
2008-05-23 01:52:21 +00:00
Bill Wendling
5fbba337e1 Remove warnings about comparison between signed and unsigned expressions.
llvm-svn: 51465
2008-05-23 01:29:08 +00:00
Dale Johannesen
da54faec0c Allow for switch with no cases. Was causing fault
in gcc.dg/pr27531-1.c.

llvm-svn: 51464
2008-05-23 01:01:31 +00:00
Evan Cheng
097e95b1f7 Bug: rcpps can only folds a load if the address is 16-byte aligned. Fixed many 'ps' load folding patterns in X86InstrSSE.td which are missing the proper alignment checks.
Also fixed some 80 col. violations.

llvm-svn: 51462
2008-05-23 00:37:07 +00:00
Dan Gohman
9674662036 Add more IR support for the new extractvalue and insertvalue
instructions.

llvm-svn: 51461
2008-05-23 00:36:11 +00:00
Dan Gohman
144390078f Use isSingleValueType instead of isFirstClassType to
exclude struct and array types.

llvm-svn: 51460
2008-05-23 00:34:04 +00:00
Dan Gohman
698b435f13 Use isSingleValueType instead of isFirstClassType to
exclude struct and array types.

llvm-svn: 51459
2008-05-23 00:17:26 +00:00
Dale Johannesen
7cc19db16f Put const weak stuff in appropriate section on Darwin.
g++.dg/abi/key2.C

llvm-svn: 51458
2008-05-23 00:16:59 +00:00
Dale Johannesen
73677fe660 Make LTO expect common and weak to be represented differently.
Reading .bc files from before that change will no longer work.

llvm-svn: 51457
2008-05-23 00:15:10 +00:00
Dan Gohman
8df50ad902 Use isSingleValueType instead of isFirstClassType to
exclude struct and array types.

llvm-svn: 51456
2008-05-23 00:12:03 +00:00
Evan Cheng
2dc53b5d58 X86CodeEmitter should not set PIC style to None at initialization time. This will break codegen if relocation model is changed to PIC_ later.
llvm-svn: 51455
2008-05-22 23:55:24 +00:00
Dan Gohman
f25b89f697 Use isSingleValueType instead of isFirstClassType to
exclude struct and array types.

llvm-svn: 51452
2008-05-22 23:43:22 +00:00
Dan Gohman
c4181f29d4 Add a polygen grammar definition for LLVM assembly language.
llvm-svn: 51449
2008-05-22 22:45:03 +00:00
Dan Gohman
bed6c00ef0 Recognize the "default" keyword, which is documented in LangRef.html
and supported in the grammar, in the lexer.

llvm-svn: 51448
2008-05-22 22:30:09 +00:00
Evan Cheng
dc3a3d3a2c Add a couple of test cases.
llvm-svn: 51441
2008-05-22 21:19:19 +00:00
David Greene
265bbfa154 When rewriting defs and uses after spilling, don't set the weight of a
live interval to infinity if the instruction being rewritten is an
original remat def instruction.  We were only checking against the clone
of the remat def which doesn't actually appear in the IR at all.

llvm-svn: 51440
2008-05-22 21:16:33 +00:00
David Greene
47ea993e83 Don't attempt to update SpillSlotToUsesMap for stack slots that aren't
generated by the spiller.

llvm-svn: 51439
2008-05-22 21:12:21 +00:00
Gabor Greif
0c41f351cc transform more loops to iterator form, detabify
llvm-svn: 51436
2008-05-22 19:24:54 +00:00
Evan Cheng
d1373cd497 Add missing patterns.
llvm-svn: 51435
2008-05-22 18:56:56 +00:00
Gabor Greif
7ccadaaaf9 Suppress warnings about missing placement delete. This should now be std-conformant even if compiled with exceptions on.
llvm-svn: 51429
2008-05-22 13:16:42 +00:00
Gabor Greif
0c8b237857 Rewrite operand loops to use iterators. This shrinks .o file (at gcc4.0.1 -O3 x86) substantially (>500 bytes). Reason still unknown.
llvm-svn: 51423
2008-05-22 06:43:33 +00:00
Chris Lattner
0a98796008 fix an off-by-one error in my previous patch, don't treat the callee as a incoming arg.
llvm-svn: 51422
2008-05-22 06:29:38 +00:00
Chris Lattner
6a45cf9dd6 Add support for multiple-return values in inline asm. This should
get inline asm working as well as it did previously with the CBE
with the new MRV support for inline asm.

llvm-svn: 51420
2008-05-22 06:19:37 +00:00
Chris Lattner
beb6254442 Fix PR2267, by allowing indirect outputs to be intermixed
with normal outputs.  Testcase here: 
test/CodeGen/X86/asm-indirect-mem.ll

llvm-svn: 51409
2008-05-22 04:46:38 +00:00
Chris Lattner
477239c56d testcase for PR2267
llvm-svn: 51408
2008-05-22 04:45:22 +00:00
Chris Lattner
5a09a5fb88 Free and vaarg are not really volatile.
llvm-svn: 51407
2008-05-22 03:23:06 +00:00
Chris Lattner
fd83f89e21 rewrite the validity checking for memory promotion to be simpler,
more aggressive, and more correct.  Verify that we only attempt to
promote loads and stores.

llvm-svn: 51406
2008-05-22 03:22:42 +00:00
Chris Lattner
f2a62165ee minor edits
llvm-svn: 51405
2008-05-22 03:06:14 +00:00
Chris Lattner
a34f7317e9 Use 'continue' to reduce nesting in this loop. No functionality change.
llvm-svn: 51399
2008-05-22 00:53:38 +00:00
Dan Gohman
2804408839 Add a Type::isSingleValueType method. This will be used by code
that currently uses Type::isFirstClassType and depends on it
returning false for struct or array types.

This commit doesn't change the behavior of Type::isFirstClassType.

llvm-svn: 51396
2008-05-21 23:35:53 +00:00
Evan Cheng
8e02953de8 Fix PR2343. An *interesting* coalescer bug.
BB1:                                                                                                                                                  
  vr1025 = copy vr1024                                                                                                                                
  ..                                                                                                                                                  
BB2:                                                                                                                                                  
  vr1024 = op                                                                                                                                         
         = op vr1025                                                                                                                                     
  <loop eventually branch back to BB1>

Even though vr1025 is copied from vr1024, it's not safe to coalesced them since live range of vr1025 intersects the def of vr1024. This happens when vr1025 is assigned the value of the previous iteration of vr1024 in the loop.

llvm-svn: 51394
2008-05-21 22:34:12 +00:00
Bill Wendling
7ec2aad450 Follow-up to the reverting of r51218. This puts the checks out-of-line. Because
they aren't in the header file, systems with a <string> header file that isn't
64-bit clean shouldn't warn if #including Path.h and specifying
-Wshorten-64-to-32.

llvm-svn: 51393
2008-05-21 21:20:07 +00:00
Gabor Greif
06c4e61e6b update a comment
llvm-svn: 51390
2008-05-21 18:57:33 +00:00
Gabor Greif
3df566d9ec adapt to new API
llvm-svn: 51387
2008-05-21 18:30:15 +00:00
Evan Cheng
272fb86c64 Rename -no-lazy to -disable-lazy-compilation.
llvm-svn: 51386
2008-05-21 18:20:21 +00:00
Nate Begeman
26bb02a23a Fix a couple issues with the JIT and multiple modules:
1. The "JITState" object creates a PassManager with the ModuleProvider that the
   jit is created with.  If the ModuleProvider is removed and deleted, the
   PassManager is invalid.

2. The Global maps in the JIT were not invalidated with a ModuleProvider was 
   removed.  This could lead to a case where the Module would be freed, and a 
   new Module with Globals at the same addresses could return invalid results.

llvm-svn: 51384
2008-05-21 16:34:48 +00:00
Gabor Greif
4a39cea7e7 resurrect lost tests by renaming them to not end with .tr
llvm-svn: 51375
2008-05-21 14:48:24 +00:00
Gabor Greif
aa0a5c230c suppress gcc3.4.6's <no value returned> warnings
llvm-svn: 51372
2008-05-21 14:07:30 +00:00
Dan Gohman
ad548e93f7 When LSR is replacing an instruction, call
ScalarEvolution::deleteValueFromRecords on it before doing the
replaceAllUsesWith, because ScalarEvolution looks at the instruction's
users to find SCEV references to the instruction's SCEV object in its
internal maps.

Move all of LSR's loop-related state clearing after processing the loop
and before cleaning up dead PHI nodes. This eliminates all of LSR's SCEV
references just before the calls to ScalarEvolution::deleteValueFromRecords
so that when ScalarEvolution drops its own SCEV references, the reference
counts will reach zero and the SCEVs will be deleted immediately.

These changes fix some compiler aborts involving ScalarEvolution holding
onto and reusing SCEV objects for instructions that have been deleted.
No regression test unfortunately; because the symptoms were due to
dangling pointers, reduced testcases ended up being fairly arbitrary.

llvm-svn: 51359
2008-05-21 00:54:12 +00:00
Bill Wendling
f4cc5ad69a Reverting r51218 because of breakage on PPC32.
llvm-svn: 51358
2008-05-20 23:54:27 +00:00
Gabor Greif
b03785f0cd Eliminate questionable syntax for stdin redirection. This probably also speeds things up a bit.
llvm-svn: 51357
2008-05-20 22:07:21 +00:00
Chris Lattner
821dc30131 Fix PR2346 by marking vaarg as volatile so that licm doesn't try to
hoist them.

llvm-svn: 51356
2008-05-20 22:05:28 +00:00
Dan Gohman
7d78d53d2a Oops, commit the version of this test that actually works.
llvm-svn: 51351
2008-05-20 21:19:36 +00:00
Dan Gohman
b48d4a75f6 Port SelectionDAG's ComputeNumSignBits-using code to instcombine,
now that instcombine also has ComputeNumSignBits.

llvm-svn: 51350
2008-05-20 21:01:12 +00:00
Gabor Greif
807c2df887 sabre brings to my attention that the 'tr' suffix is also obsolete
llvm-svn: 51349
2008-05-20 21:00:03 +00:00