Reid Spencer
5c1e9c39ef
Cleanup ConstantFoldCompareInstruction:
...
1. Make the arguments const like the other ConstantFold* functions.
2. Clean up evaluateFCmpRelation so it makes sense for floating point.
3. Implement the use of evaluateFCmpRelation to fold floating point CEs
4. Shorten a variable name so more things fit on one line.
5. Fix various comments.
llvm-svn: 32759
2006-12-24 18:52:08 +00:00
Reid Spencer
8d3b67ce23
Fix some comments.
...
llvm-svn: 32758
2006-12-24 18:42:29 +00:00
Reid Spencer
66a349efb1
For PR1066:
...
Fix this by ensuring that a bitcast is inserted to do sign switching. This
is only temporarily needed as the merging of signed and unsigned is next
on the SignlessTypes plate.
llvm-svn: 32757
2006-12-24 00:40:59 +00:00
Reid Spencer
a4415de894
Shut up some compilers that can't accurately analyze variable usage
...
correctly and emit "may be used uninitialized" warnings.
llvm-svn: 32756
2006-12-23 19:17:57 +00:00
Reid Spencer
c9426f9566
For PR1065:
...
Don't allow CmpInst instances to be processed in FoldSelectOpOp because
you can't easily swap their operands.
llvm-svn: 32753
2006-12-23 18:58:04 +00:00
Reid Spencer
13d15a94aa
Don't overload var names.
...
llvm-svn: 32752
2006-12-23 10:21:26 +00:00
Reid Spencer
4428c3483b
For PR950:
...
This patch removes the SetCC instructions and replaces them with the ICmp
and FCmp instructions. The SetCondInst instruction has been removed and
been replaced with ICmpInst and FCmpInst.
llvm-svn: 32751
2006-12-23 06:05:41 +00:00
Chris Lattner
456861c115
add a simple fast-path for dead allocas
...
llvm-svn: 32750
2006-12-22 23:14:42 +00:00
Devang Patel
e01677db41
ModulePass and ImmutablePass. Force out of line virtual method.
...
llvm-svn: 32748
2006-12-22 22:49:00 +00:00
Anton Korobeynikov
3a6faf0b96
Refactored JIT codegen for mingw32. Now we're using standart relocation
...
type for distinguish JIT & non-JIT instead of "dirty" hacks :)
llvm-svn: 32745
2006-12-22 22:29:05 +00:00
Jim Laskey
7ee1bda593
Need to walk the derived chain of typedefs to get actual size.
...
llvm-svn: 32744
2006-12-22 20:03:42 +00:00
Evan Cheng
a70d66df55
Debug dump error.
...
llvm-svn: 32743
2006-12-22 02:04:05 +00:00
Chris Lattner
f04c00f475
add a note
...
llvm-svn: 32741
2006-12-22 01:03:22 +00:00
Chris Lattner
fd16bf61d8
Fix for ARM weak symbols, patch by Lauro Ramos Venancio!
...
llvm-svn: 32740
2006-12-21 22:59:58 +00:00
Jim Laskey
80eeff2d0d
Changes from Nick Lewycky with a simplified PPCTargetAsmInfo.
...
llvm-svn: 32735
2006-12-21 20:26:09 +00:00
Reid Spencer
3dc538fe7c
Just print integer constants as signed values. The actual signedness
...
doesn't matter as it is determined in the way the constant is used.
llvm-svn: 32733
2006-12-21 19:04:23 +00:00
Reid Spencer
bf23c40f9f
Add a FIXME about signedness.
...
llvm-svn: 32732
2006-12-21 18:59:16 +00:00
Reid Spencer
66611d3e06
Simplify all the casting business and get rid of isSigned().
...
llvm-svn: 32731
2006-12-21 08:28:31 +00:00
Reid Spencer
7f2fd86692
Remove isSigned calls via foreknowledge of main's argument types.
...
llvm-svn: 32730
2006-12-21 07:49:49 +00:00
Reid Spencer
3b3cc92060
Get rid of a useless if statement whose then and else blocks were identical.
...
llvm-svn: 32729
2006-12-21 07:15:54 +00:00
Reid Spencer
480dd02b45
Add some comments about things that can go away once signless types are in.
...
llvm-svn: 32727
2006-12-21 06:43:46 +00:00
Devang Patel
b4701a315f
At the beginning of run, initialize analyis info availability for _ALL_
...
pass managers. Otherwise, stale available analysis info, from the managers not
yet run, may cause pass manager to take wrong turn.
This fixes CBE test failures reported by nightly tester.
llvm-svn: 32726
2006-12-21 00:16:50 +00:00
Jim Laskey
7cbf5d885e
Oops.
...
llvm-svn: 32724
2006-12-20 21:35:00 +00:00
Jim Laskey
74097d8025
Original patch was overly complicated.
...
llvm-svn: 32723
2006-12-20 21:33:34 +00:00
Chris Lattner
7329276511
Fix Regression/Verifier/invoke-1.ll
...
llvm-svn: 32722
2006-12-20 21:20:13 +00:00
Jim Laskey
6f0a54bd18
Changes to target powerpc for non-Darwin assemblers.
...
1. Patches from Nick Lewycky.
2. Code to filter register names and print them as numeric values on
non-Darwin systems.
llvm-svn: 32721
2006-12-20 20:56:46 +00:00
Anton Korobeynikov
df6487d069
Fixed 80 cols & style violation
...
llvm-svn: 32720
2006-12-20 20:40:30 +00:00
Chris Lattner
e5e2285492
Revert the previous patch which was incorrect. This unbreaks eon, but rebreaks
...
invoke-1.ll
llvm-svn: 32718
2006-12-20 19:50:15 +00:00
Reid Spencer
1bb72cf36e
Allow negative constants for unsigned integers and unsigned constants
...
greater than MAX_INT64 for signed integers. This is now valid and is just
waiting for the distinction between signed and unsigned to go away.
llvm-svn: 32716
2006-12-20 17:20:09 +00:00
Chris Lattner
c4b04b65ba
handle undef values much more carefully: generalize the resolveundefbranches
...
code to handle instructions as well, so that we properly fold things like
X & undef -> 0.
This fixes Transforms/SCCP/2006-12-19-UndefBug.ll
llvm-svn: 32715
2006-12-20 06:21:33 +00:00
Evan Cheng
564ef2e7f4
getLoad() and getStore() calls missed SVOffset operand. Thanks to Dan Gohman
...
for pointing it out!
llvm-svn: 32712
2006-12-20 01:27:29 +00:00
Anton Korobeynikov
76dbbd6e24
Fixed dllimported symbols support during JIT'ing. JIT on mingw32
...
platform should be more or less workable. At least, sim is running fine
under lli :)
llvm-svn: 32711
2006-12-20 01:03:20 +00:00
Chris Lattner
87e0f0787e
eliminate constructor from Statistic class. It is now impossible to get a
...
static constructor for them :). Transition complete.
llvm-svn: 32710
2006-12-19 23:17:40 +00:00
Chris Lattner
dfbfc21795
switch statistics over to not use static ctors.
...
llvm-svn: 32709
2006-12-19 23:16:47 +00:00
Chris Lattner
8896b6cb46
eliminate static ctors for Statistic objects.
...
llvm-svn: 32703
2006-12-19 22:59:26 +00:00
Chris Lattner
49f77ec857
elimiante Statistic static ctors
...
llvm-svn: 32702
2006-12-19 22:56:53 +00:00
Chris Lattner
91037dd5fd
remove static ctors from Statistic objects
...
llvm-svn: 32700
2006-12-19 22:43:32 +00:00
Chris Lattner
a975b95adb
Eliminate static ctors from Statistics
...
llvm-svn: 32698
2006-12-19 22:41:21 +00:00
Chris Lattner
03b59d4218
eliminate static ctors from Statistics
...
llvm-svn: 32697
2006-12-19 22:30:33 +00:00
Chris Lattner
8f9d2ddaf7
eliminate static ctor from example.
...
llvm-svn: 32696
2006-12-19 22:24:09 +00:00
Chris Lattner
a4ef9d3263
remove dead statistic
...
llvm-svn: 32695
2006-12-19 22:23:21 +00:00
Chris Lattner
4d19c9634d
switch more statistics over to STATISTIC, eliminating static ctors. Also,
...
delete some dead ones.
llvm-svn: 32694
2006-12-19 22:17:40 +00:00
Chris Lattner
44723daefa
Eliminate static ctors due to Statistic objects
...
llvm-svn: 32693
2006-12-19 22:09:18 +00:00
Chris Lattner
7d23f71814
Convert more Statistic's over to STATISTIC
...
llvm-svn: 32692
2006-12-19 21:49:03 +00:00
Chris Lattner
9e7640cf02
Switch over Transforms/Scalar to use the STATISTIC macro. For each statistic
...
converted, we lose a static initializer. This also allows GCC to emit warnings
about unused statistics.
llvm-svn: 32690
2006-12-19 21:40:18 +00:00
Evan Cheng
f5c9f4c3c9
Fix for PR1062 by Dan Gohman.
...
llvm-svn: 32688
2006-12-19 21:31:42 +00:00
Chris Lattner
c18ec8716e
Refactor statistic a big and introduce a horrible-but-necessary macro
...
(STATISTIC), which allows us to define statistics that don't introduce
static ctors into the .o files. I'm migrating code over to use this
incrementally.
llvm-svn: 32687
2006-12-19 21:27:47 +00:00
Reid Spencer
812cc9c807
Now that ConstantInt::isValueValidForType can handle signed and unsigned
...
values regardless of the signedness of the constant's type, it is okay to
always make the AsmWriter.cpp print constant ints as signed values. The
AsmParser will automatically handle things like: uint -1 as a result.
llvm-svn: 32686
2006-12-19 21:16:35 +00:00
Anton Korobeynikov
391dc74af0
Fix for PR1059: http://llvm.org/PR1059
...
llvm-svn: 32685
2006-12-19 21:04:20 +00:00
Devang Patel
06a6041a4a
Now, there is additional layer, referred in the comment,
...
in place to handle this correctly.
llvm-svn: 32684
2006-12-19 20:12:38 +00:00
Devang Patel
328930d725
s/BasicBlockPassManager/BBPassManager/g
...
s/ModulePassManager/MPPassManager/g
s/FunctionPassManagerImpl_New/FunctionPassManagerImpl/g
s/PassManagerImpl_New/PassManagerImpl/g
Introduce FPPassManager to manage function passes and
BBPassManagers.
Now FunctionPassManagerImpl is an implementation class
used by externally visible FunctionPassManager to manage
FPPassManagers.
Module pass manager (MPPassManager) now manages FPPassManagers
and ModulePasses.
llvm-svn: 32679
2006-12-19 19:46:59 +00:00
Chris Lattner
5e52d6c0da
The x86-64 target machine should be used for amd64-* target triples.
...
llvm-svn: 32678
2006-12-19 19:40:09 +00:00
Chris Lattner
26f8533c7f
Fix PR1061 and CodeGen/X86/2006-12-19-IntelSyntax.ll
...
llvm-svn: 32676
2006-12-19 19:29:58 +00:00
Anton Korobeynikov
ff6535c892
Partly fixed JITing on mingw32 platform. The support is not full due to
...
absence of dllimport JIT codegen.
llvm-svn: 32673
2006-12-19 15:24:18 +00:00
Reid Spencer
06d4d23dc0
Clean up ConstantFoldCastInstruction.
...
llvm-svn: 32672
2006-12-19 07:41:40 +00:00
Reid Spencer
77b7f03711
Rewrite ConstantFoldCastInstruction so that it doesn't use any of the
...
ConstRules. Remove the casting rules from ConstRules and subclasses. This
cleans up ConstantFolding significantly. Passes all tests.
llvm-svn: 32671
2006-12-19 03:15:47 +00:00
Evan Cheng
9e0ae42e6d
May need to promote the operand (either sign_extend_inreg or and) before
...
expanding a {s|u}int_to_fp.
llvm-svn: 32665
2006-12-19 01:44:04 +00:00
Reid Spencer
e9d6e54b36
Make ConstantInt not care about sign any more. To ensure the AsmParser can
...
still check the validity of signed values an overload to isValueValidForType
was added to allow passing in an int64_t to check.
llvm-svn: 32663
2006-12-19 01:28:19 +00:00
Chris Lattner
28c15ed860
Fix a bug in GetConstantFactor for affine expressions, in which the existing
...
code was wrong for things like 3+4*i.
llvm-svn: 32662
2006-12-19 01:16:02 +00:00
Reid Spencer
f810a0cfab
Remove a useless statement.
...
llvm-svn: 32660
2006-12-18 23:40:19 +00:00
Evan Cheng
975589f630
LegalizeSetCCOperands() may end up inserting libcalls. They need to be
...
properly serialized. Do not clear LastCallSEQ_END until that is done.
llvm-svn: 32659
2006-12-18 22:55:34 +00:00
Reid Spencer
24a09586a9
For PR1042:
...
Fix a thinko. We want to check the second case if the first cast *didn't*
trigger.
llvm-svn: 32657
2006-12-18 21:56:29 +00:00
Rafael Espindola
05b3447706
macros -> Inline functions
...
Lauros's patch
llvm-svn: 32656
2006-12-18 11:07:09 +00:00
Reid Spencer
97af158c16
Remove the createInferredCast methods now that their last uses have been
...
removed. All casting is now explicit and not inferred by VMCore.
llvm-svn: 32655
2006-12-18 08:52:59 +00:00
Reid Spencer
f6bd59ba81
Convert the last uses of CastInst::createInferredCast to a normal cast
...
creation. These changes are still temporary but at least this pushes
knowledge of signedness out closer to where it can be determined properly
and allows signedness to be removed from VMCore.
llvm-svn: 32654
2006-12-18 08:47:13 +00:00
Reid Spencer
6769fa4ba2
Remove the two-argument (inferred cast) form of ConstantExpr::getCast now
...
that its last uses have been removed.
llvm-svn: 32653
2006-12-18 08:18:46 +00:00
Reid Spencer
f31673d965
Convert the last use of two-argument ConstantExpr::getCast into another
...
form so we can remove that method from ConstantExpr.
llvm-svn: 32652
2006-12-18 08:16:27 +00:00
Reid Spencer
1f5e1ff1a2
Revert last patch. ConstantInt isn't quite ready for signlessness.
...
llvm-svn: 32650
2006-12-18 04:22:56 +00:00
Rafael Espindola
08c0825f18
move ExtWeakSymbols to AsmPrinter
...
llvm-svn: 32648
2006-12-18 03:37:18 +00:00
Reid Spencer
9ac4a6b7d0
Remove the last use of getUnsignedVersion and getSignedVersion from VMCore.
...
ConstantInt doesn't care about the sign of the type it represents. It only
cares about the bitwidth so there is no need to make the sign of the type
match the SExt or ZExt constant expression.
llvm-svn: 32646
2006-12-18 01:11:03 +00:00
Chris Lattner
3a173beb93
Fix PR1057 (compilation on macos 10.3), patch by Scott Michel!
...
llvm-svn: 32644
2006-12-17 21:04:02 +00:00
Reid Spencer
0cb59889d2
Use a predicate function to identify bitcast of fp and integer instead of
...
repeating the logic in two different parts of the code.
llvm-svn: 32643
2006-12-17 20:24:50 +00:00
Reid Spencer
85f67cbc7a
Fix PR1058:
...
Generate the BITCAST_TEMPORARY regardless of the uses or inlinability of
the instruction. This temporary is needed to perform the instruction, not
provide storage for its results.
llvm-svn: 32642
2006-12-17 18:50:51 +00:00
Bill Wendling
34f4c12ae7
Fixed so that it dereferences the ostream pointer.
...
llvm-svn: 32640
2006-12-17 11:15:53 +00:00
Bill Wendling
5b534cf128
This snuck in. Reverted.
...
llvm-svn: 32638
2006-12-17 11:11:10 +00:00
Bill Wendling
7f6a73eb5c
Added an automatic cast to "std::ostream*" etc. from OStream. We then can
...
rework the hacks that had us passing OStream in. We pass in std::ostream*
instead, check for null, and then dispatch to the correct print() method.
llvm-svn: 32636
2006-12-17 05:15:13 +00:00
Chris Lattner
6bdae11796
when inserting a dummy argument to work-around the CBE not supporting
...
zero arg vararg functions, pass undef instead of 'int 0', which is cheaper.
llvm-svn: 32634
2006-12-16 21:21:53 +00:00
Chris Lattner
8b1e4d1edf
Fix PR1049 and CodeGen/Generic/2006-12-16-InlineAsmCrash.ll
...
by producing target constants instead of constants. Constants can get
selected to li/movri instructions, which causes the scheduler to explode.
llvm-svn: 32633
2006-12-16 21:14:48 +00:00
Chris Lattner
e223919df1
Apply B. Scott Michel's patch for PR1054, thanks!
...
llvm-svn: 32630
2006-12-16 20:23:42 +00:00
Evan Cheng
7775b33a32
Cannot combine an indexed load / store any further.
...
llvm-svn: 32629
2006-12-16 06:25:23 +00:00
Chris Lattner
f511077490
Fix PR1042, by tightening up the subtle rules with invoke value use.
...
llvm-svn: 32624
2006-12-16 02:25:35 +00:00
Evan Cheng
a966bf47ec
Expand FP undef
...
llvm-svn: 32623
2006-12-16 02:20:50 +00:00
Jeff Cohen
c396e18e8e
The best unbreakage yet, addressing Bill's concerns.
...
llvm-svn: 32622
2006-12-16 02:15:42 +00:00
Evan Cheng
d4fd650c5f
Allow promoted FP_TO_UINT / FP_TO_SINT to expand operand.
...
llvm-svn: 32621
2006-12-16 02:10:30 +00:00
Devang Patel
d29f6ec89c
Add getNumContainedPasses() and getContainedPass() inteface and use
...
it instead of passVectorBegin/End().
llvm-svn: 32620
2006-12-16 00:56:26 +00:00
Evan Cheng
b0292a750a
Expand fabs / fneg to and / xor.
...
llvm-svn: 32619
2006-12-16 00:52:40 +00:00
Devang Patel
fb82dcf9ee
Cosmetic changes, based on Chris's review.
...
llvm-svn: 32618
2006-12-15 22:57:49 +00:00
Jeff Cohen
03161dd132
An even better unbreakage...
...
llvm-svn: 32617
2006-12-15 22:57:14 +00:00
Evan Cheng
ea9ab75427
Fix select_cc, select expansion to soft-fp bugs.
...
llvm-svn: 32616
2006-12-15 22:42:55 +00:00
Jeff Cohen
95adeca578
Partial unbreak of VC++ (stream stuff has no easy fix).
...
llvm-svn: 32614
2006-12-15 21:47:01 +00:00
Reid Spencer
40691d741a
Remove an extraneous { at the end of a block.
...
llvm-svn: 32613
2006-12-15 21:46:37 +00:00
Jim Laskey
1507a869b2
Patterns no longer needed due to fix in the DAG combiner.
...
llvm-svn: 32612
2006-12-15 21:39:31 +00:00
Jim Laskey
0809c79c60
This code was usurping the sextload expand in teh legalizer. Just make
...
sure the right conditions are checked.
llvm-svn: 32611
2006-12-15 21:38:30 +00:00
Devang Patel
a37c63bcd5
Mark dump* routines const routines.
...
llvm-svn: 32610
2006-12-15 20:13:01 +00:00
Evan Cheng
32c45fa21e
Some AT&T syntax assembler (e.g. Mac OS X) does not recognize the movq alias for i64 <-> XMM moves.
...
llvm-svn: 32609
2006-12-15 19:58:58 +00:00
Reid Spencer
4edcae5076
Fix long standing issue with propagating error message back to caller. This
...
has been a problem since exceptions were removed from the BytecodeReader.
Error messages are now captured from ModuleProvider::releaseModule as well
as after a longjmp.
llvm-svn: 32608
2006-12-15 19:49:23 +00:00
Reid Spencer
d752b2b528
For PR1050:
...
Convert asserts into error messages.
llvm-svn: 32607
2006-12-15 19:44:51 +00:00
Devang Patel
f2b927a162
Move PMTopLevelManager and TImingInfo into anon namespace.
...
llvm-svn: 32606
2006-12-15 19:39:30 +00:00
Jim Laskey
e1216497dc
Not all test cases are created equal. This fix is needed.
...
llvm-svn: 32605
2006-12-15 18:51:01 +00:00
Jim Laskey
0641795154
Not needed. Misinterpreted error message from other bug (Missing load/store
...
relocations.)
llvm-svn: 32604
2006-12-15 18:45:32 +00:00
Andrew Lenharth
3033b03f33
extern_weak linkage. fixes PR1038
...
llvm-svn: 32603
2006-12-15 17:35:32 +00:00
Jim Laskey
b07d89090c
Missing load/store relocations.
...
llvm-svn: 32601
2006-12-15 16:44:10 +00:00
Jim Laskey
d00589fefd
Provide 64-bit support for i64 sextload<i8>.
...
llvm-svn: 32600
2006-12-15 14:34:11 +00:00
Jim Laskey
721e7d2129
Provide support for FP_TO_UINT.
...
llvm-svn: 32599
2006-12-15 14:32:57 +00:00
Chris Lattner
3e789e232f
silence a bogus warning
...
llvm-svn: 32597
2006-12-15 07:36:19 +00:00
Chris Lattner
ab423afd90
re-enable a temporarily-reverted patch
...
llvm-svn: 32595
2006-12-15 07:32:38 +00:00
Evan Cheng
a221cb0b2c
Minor clean up.
...
llvm-svn: 32593
2006-12-15 06:41:01 +00:00
Evan Cheng
c24bf8bd87
This is done.
...
llvm-svn: 32591
2006-12-15 05:50:39 +00:00
Evan Cheng
4e661ebef9
Expand FP compares to soft-fp call(s)
...
llvm-svn: 32590
2006-12-15 02:59:56 +00:00
Devang Patel
d3ea9ae6e9
s/ForcedLastUses/TransferLastUses/g
...
Register pass has the its last user, otherwise sometimes no one will claim
LastUse.
Handle transferred last uses from child pass manager.
llvm-svn: 32589
2006-12-15 00:08:26 +00:00
Jim Laskey
1becbe31b8
Simplify the fetching of relocation mode.
...
llvm-svn: 32588
2006-12-14 22:53:42 +00:00
Evan Cheng
5effab79f3
f64 <-> i64 bit_convert using movq in 64-bit mode.
...
llvm-svn: 32587
2006-12-14 21:55:39 +00:00
Evan Cheng
4529b8cf2e
Fix a couple of typo's.
...
llvm-svn: 32585
2006-12-14 19:46:06 +00:00
Evan Cheng
6100c83f79
This is done.
...
llvm-svn: 32584
2006-12-14 19:45:32 +00:00
Evan Cheng
9918e7780a
Added MOVSS2DIrr and MOVDI2SSrr to foldMemeoryOperand().
...
llvm-svn: 32583
2006-12-14 19:44:45 +00:00
Evan Cheng
4dc2f8e9bb
- Rename MOVDSS2DIrr to MOVSS2DIrr for consistency sake.
...
- Add MOVDI2SSrm and MOVSS2DImr to fold load / store for i32 <-> f32 bit_convert
patterns.
llvm-svn: 32582
2006-12-14 19:43:11 +00:00
Jim Laskey
19b276f67f
1. Tidy up jump table info.
...
2. Allow the jit to handle PIC relocable jump tables.
llvm-svn: 32581
2006-12-14 19:17:33 +00:00
Rafael Espindola
d19ea53887
avoid using a constant table when a constant can be used inline
...
llvm-svn: 32580
2006-12-14 18:58:37 +00:00
Chris Lattner
8213655f44
random minor typographical changes
...
llvm-svn: 32579
2006-12-14 18:22:14 +00:00
Rafael Espindola
0d92ae76fb
Avoid creating invalid sub/add instructions on the prolog/epilog
...
patch by Lauro
llvm-svn: 32577
2006-12-14 13:31:27 +00:00
Evan Cheng
2f7cae1f57
Fix a long-standing spiller bug:
...
If a spillslot value is available in a register, and there is a noop copy that
targets that register, the spiller correctly decide not to invalidate the
spillslot register.
However, even though the noop copy does not clobbers the value. It does start a
new intersecting live range. That means the spillslot register is available for
use but should not be reused for a two-address instruction modref operand which
would clobber the new live range.
When we remove the noop copy, update the available information by clearing the
canClobber bit.
llvm-svn: 32576
2006-12-14 07:54:05 +00:00
Devang Patel
6a85af195a
Add -time-passes support.
...
llvm-svn: 32574
2006-12-14 00:59:42 +00:00
Devang Patel
76ecbc449f
Add debug-pass=Details support to print Required and Preserved Set info.
...
llvm-svn: 32573
2006-12-14 00:25:06 +00:00
Devang Patel
740b960858
Add " Made Modification " messages in debug-pass=Executions output.
...
llvm-svn: 32572
2006-12-14 00:08:04 +00:00
Devang Patel
b726becbcd
Add debug-pass=Executions support in new pass manager.
...
llvm-svn: 32571
2006-12-13 23:50:44 +00:00
Devang Patel
5a200bf480
Add -pass-debug=Arguments support in new manager.
...
llvm-svn: 32567
2006-12-13 22:10:00 +00:00
Chris Lattner
e8d97c0b07
fit in 80 cols
...
llvm-svn: 32563
2006-12-13 21:56:10 +00:00
Devang Patel
58ac5db67f
Using PDL as a prefix for PassDebugLevel enums is not a good idea.
...
Fix it.
llvm-svn: 32562
2006-12-13 21:13:31 +00:00
Evan Cheng
504fec49b1
Add note.
...
llvm-svn: 32561
2006-12-13 20:59:43 +00:00
Evan Cheng
10389e802b
More soft-fp work.
...
llvm-svn: 32559
2006-12-13 20:57:08 +00:00
Devang Patel
7208b2e3e6
Move enum PassDebugLevel from PassManagerT.h to Pass.h.
...
Use PDL as the prefix for these enums.
Define and use PassDebugging_New in new PassManager.
llvm-svn: 32554
2006-12-13 20:03:48 +00:00
John Criswell
edc020ec46
Changed from PARALLEL_DIRS to DIRS since we're only building one directory.
...
Thanks Reid.
llvm-svn: 32551
2006-12-13 19:42:54 +00:00
John Criswell
e6f8bb4ee2
Remove DSA.
...
llvm-svn: 32550
2006-12-13 19:41:57 +00:00
Reid Spencer
67cca26f75
Fix a bug in EvaluateInDifferentType. The type of operand should not be
...
used to determine whether a ZExt or SExt cast is performed. Instead, pass
an "isSigned" bool to the function and determine its value from the opcode
of the cast involved.
Also, clean up some cruft from previous patches.
llvm-svn: 32548
2006-12-13 18:21:21 +00:00
Jim Laskey
ccb6b45e70
Update version in safe guards.
...
llvm-svn: 32546
2006-12-13 17:49:24 +00:00
Reid Spencer
8479bb2735
Implement review feedback. Most of this has to do with removing unnecessary
...
cast instructions. A few are bug fixes.
llvm-svn: 32544
2006-12-13 17:19:09 +00:00
John Criswell
165218fb87
Remove DSA.
...
llvm-svn: 32542
2006-12-13 16:54:24 +00:00
Reid Spencer
a9a637d6e2
For mul transforms, when checking for a cast from bool as either operand,
...
make sure to also check that it is a zext from bool, not any other cast
operation type.
llvm-svn: 32539
2006-12-13 08:33:33 +00:00
Reid Spencer
32b08ba50f
Fix and/or/xor (cast A), (cast B) --> cast (and/or/xor A, B)
...
The cast patch introduced the possibility that the wrong cast opcode
could be used and that this transform could trigger on different kinds
of cast operations. This patch rectifies that.
llvm-svn: 32538
2006-12-13 08:27:15 +00:00
Reid Spencer
ad772bfec3
Change the interface to SCEVExpander::InsertCastOfTo to take a cast opcode
...
so the decision of which opcode to use is pushed upward to the caller.
Adjust the callers to pass the expected opcode.
llvm-svn: 32535
2006-12-13 08:06:42 +00:00
Reid Spencer
540e6eb24b
Fix some casts. isdigit(c) returns 0 or 1, not 0 or -1
...
llvm-svn: 32534
2006-12-13 08:04:32 +00:00
Chris Lattner
1228f12fb4
only check non-external functions
...
llvm-svn: 32530
2006-12-13 04:45:46 +00:00
Chris Lattner
be3585daa3
Reject attempts to define intrinsics. This fixes PR1047 and
...
Regression/Verifier/2006-12-12-IntrinsicDefine.ll
llvm-svn: 32529
2006-12-13 04:30:37 +00:00
Evan Cheng
e200668366
Expand (f64 extload f32) to (f64 fp_ext (load f32)) if f64 type action is expand.
...
llvm-svn: 32527
2006-12-13 03:19:57 +00:00
Evan Cheng
d5d848048f
Expand fsqrt, fsin, and fcos to libcalls.
...
llvm-svn: 32526
2006-12-13 02:38:13 +00:00
Devang Patel
3c8836df17
Add #ifdef switch toggle between old and new pass manager. However,
...
continue to use old pass manager at the moment. To use new manager
remove #define USE_OLD_PASSMANAGER 1 from Pass.h
llvm-svn: 32525
2006-12-13 02:36:01 +00:00
Chris Lattner
b486de5e73
revert my recent int<->fp and vector union promotion changes, they expose
...
obscure bugs affecting the X86 code generator. I will reenable this
when fixed.
llvm-svn: 32524
2006-12-13 02:26:45 +00:00
Evan Cheng
f72f8a7730
Expand f32 / f64 to i32 / i64 conversion to soft-fp library calls.
...
llvm-svn: 32523
2006-12-13 01:57:55 +00:00
Reid Spencer
50702907eb
Replace CastInst::createInferredCast calls with more accurate cast
...
creation calls.
llvm-svn: 32521
2006-12-13 00:50:17 +00:00
Devang Patel
ad1c3bba52
FunctionPassManager does not support runOnModule().
...
llvm-svn: 32519
2006-12-13 00:34:32 +00:00
Devang Patel
ae0e0cdff7
Implement PassManager_New destructors.
...
llvm-svn: 32517
2006-12-13 00:09:23 +00:00
Devang Patel
da35cdf10e
Remove unused constructor.
...
llvm-svn: 32516
2006-12-12 23:51:31 +00:00
Reid Spencer
0e981c9088
Replace inferred getCast(V,Ty) calls with more strict variants.
...
Rename getZeroExtend and getSignExtend to getZExt and getSExt to match
the the casting mnemonics in the rest of LLVM.
llvm-svn: 32514
2006-12-12 23:36:14 +00:00
Devang Patel
ae9da674a1
Add routines to dump pass manager queue.
...
llvm-svn: 32513
2006-12-12 23:34:33 +00:00
Devang Patel
b26731c9cd
FunctionPassManager()
...
Set AnalysisResolver_New and add FPM to PassManagers list.
llvm-svn: 32512
2006-12-12 23:27:37 +00:00
Devang Patel
e08024130b
Do not runOnFunction on external functions.
...
llvm-svn: 32510
2006-12-12 23:15:28 +00:00
Devang Patel
09032bc2b0
Initialize AnalysisImpls for each pass before executing the pass.
...
llvm-svn: 32509
2006-12-12 23:13:09 +00:00
Devang Patel
e969385cb9
collectRequiredAnalysisPasses().
...
Include RequiredTrainsitiveSet also.
llvm-svn: 32508
2006-12-12 23:09:32 +00:00
Devang Patel
8a5442e16d
removeNotPreservedAnalysis().
...
Do not remove ImmutablePass from the list.
llvm-svn: 32507
2006-12-12 23:07:44 +00:00
Devang Patel
94bb02ef16
Initialize activeManager.
...
llvm-svn: 32506
2006-12-12 22:57:43 +00:00
Devang Patel
a756f126ea
Remove unused constructor.
...
llvm-svn: 32505
2006-12-12 22:56:36 +00:00
Devang Patel
ea7846dd99
Maintain ImmutablePasses list at top level only. Do not make them
...
directly available to individual managers.
llvm-svn: 32504
2006-12-12 22:53:40 +00:00
Devang Patel
4d694e6674
findAnalysisPass().
...
First search all available passes before searching ImmutablePasses.
llvm-svn: 32503
2006-12-12 22:50:05 +00:00
Devang Patel
921f11b896
Fix thinko.
...
While searching for a analysis in a pass manager, do not search it into
pass manager's manager.
llvm-svn: 32501
2006-12-12 22:47:13 +00:00
Devang Patel
a3a8aeb459
o s/OtherPassManagers/IndirectPassManagers
...
o Make IndirectPassManagers vector of PMDataManager *
o Move PMTopLevelManager implementation below all class declarations.
llvm-svn: 32499
2006-12-12 22:35:25 +00:00
Devang Patel
bda67816fd
Initialize AnalysisImpls for ImmutablePass.
...
llvm-svn: 32498
2006-12-12 22:21:37 +00:00
Evan Cheng
3e6cc1641c
Expand FP constant to integers if FP types are not legal.
...
llvm-svn: 32497
2006-12-12 22:19:28 +00:00
Devang Patel
f2e0fe66cd
Set top level manager.
...
llvm-svn: 32496
2006-12-12 22:02:16 +00:00
Evan Cheng
aefab1a7c1
Soft fp FNEG, SINT_TO_FP, UINT_TO_FP libcall expansion.
...
llvm-svn: 32495
2006-12-12 21:51:17 +00:00
Evan Cheng
8a830bc4a1
Expand ConstantFP to load from CP if float types are being expanded.
...
llvm-svn: 32494
2006-12-12 21:32:44 +00:00
Evan Cheng
061d636b7a
Expand i32/i64 CopyToReg f32/f64 to BIT_CONVERT + CopyToReg.
...
llvm-svn: 32493
2006-12-12 21:21:32 +00:00
Jim Laskey
ac064e92da
Honor cpu directive, take two.
...
llvm-svn: 32492
2006-12-12 20:57:08 +00:00
Evan Cheng
75b41e03f6
- When expanding a bit_convert whose src operand is also to be expanded and
...
its expansion result type is equal to the result type of the bit_convert,
e.g. (i64 bit_convert (f64 op)) if FP is not legal
returns the result of the expanded source operand.
- Store f32 / f64 may be expanded to a single store i32/i64.
llvm-svn: 32490
2006-12-12 19:53:13 +00:00
Jim Laskey
b039172d58
Rollback changes to take a different tack.
...
llvm-svn: 32488
2006-12-12 19:26:50 +00:00
Chris Lattner
6ff0a2a18d
this can be trunc or bitcast, per line 3092.
...
llvm-svn: 32487
2006-12-12 19:11:20 +00:00
Chris Lattner
2f28a1e015
Fix regression on 400.perlbench last night.
...
llvm-svn: 32486
2006-12-12 18:41:03 +00:00
Rafael Espindola
7c4245c4e3
more general matching of the MVN instruction
...
llvm-svn: 32484
2006-12-12 17:10:13 +00:00
Jim Laskey
8a5cea99ed
Honor the command line specification for machine type.
...
llvm-svn: 32483
2006-12-12 16:07:33 +00:00
Rafael Espindola
a65fd68f23
don't use "ordinary" addressing mode 1 when mvn is appropriate
...
llvm-svn: 32482
2006-12-12 14:03:29 +00:00
Jim Laskey
18b1edb10d
Reduce number of instructions to load 64-bit constants.
...
llvm-svn: 32481
2006-12-12 13:23:43 +00:00
Reid Spencer
3ac324ab41
Fix numerous inferred casts.
...
llvm-svn: 32479
2006-12-12 09:18:51 +00:00
Reid Spencer
04710becf5
Get even more accurate on the casting.
...
llvm-svn: 32478
2006-12-12 09:17:50 +00:00
Reid Spencer
3d1b0dfba6
Fix the casting for the computation of the Malloc size.
...
llvm-svn: 32477
2006-12-12 09:17:08 +00:00
Evan Cheng
df11bd2186
Expand formal arguments and call arguments recursively: e.g. f64 -> i64 -> 2 x i32.
...
llvm-svn: 32476
2006-12-12 07:27:38 +00:00
Reid Spencer
e9161a2f5e
Don't create usless casts for same-bith-width floating point casts.
...
llvm-svn: 32475
2006-12-12 05:38:50 +00:00
Chris Lattner
ddb1fa5291
fit in 80 cols
...
llvm-svn: 32474
2006-12-12 05:22:21 +00:00
Chris Lattner
0405309282
this can only be fptrunc.
...
llvm-svn: 32473
2006-12-12 05:21:51 +00:00
Chris Lattner
0b46ffb643
This case isn't needed with recent changes to ConstantInt::get
...
llvm-svn: 32472
2006-12-12 05:19:46 +00:00
Chris Lattner
0ecfce975c
split up inttoptr from ptrtoint handling, the cases aren't similar at all.
...
llvm-svn: 32471
2006-12-12 05:18:19 +00:00
Chris Lattner
4c064bcc3e
the operand of a bitcast is always the right size, just emit it in place.
...
llvm-svn: 32470
2006-12-12 05:14:13 +00:00
Reid Spencer
562b83c7df
Change inferred getCast into specific getCast. Passes all tests.
...
llvm-svn: 32469
2006-12-12 05:05:00 +00:00
Chris Lattner
a9b75a7e35
Patch for PR1045 and Transforms/ScalarRepl/2006-12-11-SROA-Crash.ll
...
llvm-svn: 32468
2006-12-12 04:24:41 +00:00
Chris Lattner
0fd9c58f6a
Revert Nate's patch to fix X86/store-fp-constant.ll. With the dag combiner
...
and legalizer separated like they currently are, I don't see a way to handle
this xform.
llvm-svn: 32466
2006-12-12 04:18:56 +00:00
Chris Lattner
df2345fcbe
make this code more aggressive about turning store fpimm into store int imm.
...
This is not sufficient to fix X86/store-fp-constant.ll
llvm-svn: 32465
2006-12-12 04:16:14 +00:00
Chris Lattner
51c27947c6
teach scev to analyze X*4|1 like X*4+c. This allows us to produce:
...
LBB1_1: #bb
movdqa (%esi), %xmm2
movaps %xmm2, %xmm3
punpcklbw %xmm0, %xmm3
movaps %xmm3, %xmm4
punpcklwd %xmm0, %xmm4
cvtdq2ps %xmm4, %xmm4
mulps %xmm1, %xmm4
movaps %xmm4, (%edi)
leal 1(,%eax,4), %ebx
shll $4, %ebx
punpckhwd %xmm0, %xmm3
cvtdq2ps %xmm3, %xmm3
mulps %xmm1, %xmm3
movaps %xmm3, (%edx,%ebx)
leal 2(,%eax,4), %ebx
shll $4, %ebx
punpckhbw %xmm0, %xmm2
movaps %xmm2, %xmm3
punpcklwd %xmm0, %xmm3
cvtdq2ps %xmm3, %xmm3
mulps %xmm1, %xmm3
movaps %xmm3, (%edx,%ebx)
leal 3(,%eax,4), %ebx
shll $4, %ebx
punpckhwd %xmm0, %xmm2
cvtdq2ps %xmm2, %xmm2
mulps %xmm1, %xmm2
movaps %xmm2, (%edx,%ebx)
addl $64, %edi
incl %eax
addl $16, %esi
cmpl %ecx, %eax
jne LBB1_1 #bb
instead of:
LBB1_1: #bb
movdqa (%esi), %xmm2
movaps %xmm2, %xmm3
punpcklbw %xmm0, %xmm3
movaps %xmm3, %xmm4
punpcklwd %xmm0, %xmm4
cvtdq2ps %xmm4, %xmm4
mulps %xmm1, %xmm4
movaps %xmm4, (%edi)
leal 1(,%eax,4), %ebx
shll $4, %ebx
punpckhwd %xmm0, %xmm3
cvtdq2ps %xmm3, %xmm3
mulps %xmm1, %xmm3
movaps %xmm3, (%edx,%ebx)
leal 2(,%eax,4), %ebx
shll $4, %ebx
punpckhbw %xmm0, %xmm2
movaps %xmm2, %xmm3
punpcklwd %xmm0, %xmm3
cvtdq2ps %xmm3, %xmm3
mulps %xmm1, %xmm3
movaps %xmm3, (%edx,%ebx)
leal 3(,%eax,4), %ebx
shll $4, %ebx
punpckhwd %xmm0, %xmm2
cvtdq2ps %xmm2, %xmm2
mulps %xmm1, %xmm2
movaps %xmm2, (%edx,%ebx)
addl $64, %edi
incl %eax
addl $16, %esi
cmpl %ecx, %eax
jne LBB1_1 #bb
for a testcase.
llvm-svn: 32463
2006-12-12 02:26:09 +00:00
Reid Spencer
5af6b6baf1
Tidy up a bit.
...
llvm-svn: 32462
2006-12-12 01:32:02 +00:00
Reid Spencer
5bc563a190
Change inferred cast creation calls to more specific cast creations.
...
llvm-svn: 32460
2006-12-12 01:17:41 +00:00
Rafael Espindola
d29cb12dfc
use MVN to handle small negative constants
...
llvm-svn: 32459
2006-12-12 01:03:11 +00:00
Reid Spencer
3fbfed6e2c
Implement getIntegerCast and getFPCast for ConstantExpr. These are similar
...
to the createIntegerCast and createFPCast for CastInst instructions.
llvm-svn: 32457
2006-12-12 00:51:07 +00:00
Reid Spencer
a82b285a69
Implement createIntegerCast and createFPCast factory methods for handling
...
integer and floating point cast creation. createIntegerCast generates
ZExt/SExt, BitCast or Trunc. createFPCast generates FPExt, Bitcast, or
FPTrunc.
llvm-svn: 32456
2006-12-12 00:49:44 +00:00