Chris Lattner
0e5255bdc6
Convert more Statistic's over to STATISTIC
...
llvm-svn: 32692
2006-12-19 21:49:03 +00:00
Chris Lattner
79a42ac941
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
582ac4bed7
Fix for PR1062 by Dan Gohman.
...
llvm-svn: 32688
2006-12-19 21:31:42 +00:00
Chris Lattner
13bfd32f5d
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
2acb8e1a43
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
44ef93449a
Fix for PR1059: http://llvm.org/PR1059
...
llvm-svn: 32685
2006-12-19 21:04:20 +00:00
Devang Patel
cb5128a8d9
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
67d6a5e411
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
68f62b58f7
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
a7f95900f4
Fix PR1061 and CodeGen/X86/2006-12-19-IntelSyntax.ll
...
llvm-svn: 32676
2006-12-19 19:29:58 +00:00
Anton Korobeynikov
eef04ba1c2
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
8dabca4118
Clean up ConstantFoldCastInstruction.
...
llvm-svn: 32672
2006-12-19 07:41:40 +00:00
Reid Spencer
f5fc34ad09
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
9ad6edf2ec
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
e733472221
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
0a1e99317e
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
8b5cd5f710
Remove a useless statement.
...
llvm-svn: 32660
2006-12-18 23:40:19 +00:00
Evan Cheng
adc80f98cf
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
77cc7edf3e
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
3ab9256d19
macros -> Inline functions
...
Lauros's patch
llvm-svn: 32656
2006-12-18 11:07:09 +00:00
Reid Spencer
e45ac2ab11
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
668d90f289
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
4800c38a75
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
b83593e3ea
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
db6b6fb916
Revert last patch. ConstantInt isn't quite ready for signlessness.
...
llvm-svn: 32650
2006-12-18 04:22:56 +00:00
Rafael Espindola
d7998d0e6d
move ExtWeakSymbols to AsmPrinter
...
llvm-svn: 32648
2006-12-18 03:37:18 +00:00
Reid Spencer
776311e000
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
811d75f71a
Fix PR1057 (compilation on macos 10.3), patch by Scott Michel!
...
llvm-svn: 32644
2006-12-17 21:04:02 +00:00
Reid Spencer
8bd6317823
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
174dc2f35e
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
e33ce528da
Fixed so that it dereferences the ostream pointer.
...
llvm-svn: 32640
2006-12-17 11:15:53 +00:00
Bill Wendling
e891701547
This snuck in. Reverted.
...
llvm-svn: 32638
2006-12-17 11:11:10 +00:00
Bill Wendling
a77f14265b
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
fd5f03ec3f
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
9bd5ed636c
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
360a14be02
Apply B. Scott Michel's patch for PR1054, thanks!
...
llvm-svn: 32630
2006-12-16 20:23:42 +00:00
Evan Cheng
28cf4277bb
Cannot combine an indexed load / store any further.
...
llvm-svn: 32629
2006-12-16 06:25:23 +00:00
Chris Lattner
697617709c
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
851e589eda
Expand FP undef
...
llvm-svn: 32623
2006-12-16 02:20:50 +00:00
Jeff Cohen
29192e6274
The best unbreakage yet, addressing Bill's concerns.
...
llvm-svn: 32622
2006-12-16 02:15:42 +00:00
Evan Cheng
860004688a
Allow promoted FP_TO_UINT / FP_TO_SINT to expand operand.
...
llvm-svn: 32621
2006-12-16 02:10:30 +00:00
Devang Patel
abfbe3bfda
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
388cbbf000
Expand fabs / fneg to and / xor.
...
llvm-svn: 32619
2006-12-16 00:52:40 +00:00
Devang Patel
56d48ec501
Cosmetic changes, based on Chris's review.
...
llvm-svn: 32618
2006-12-15 22:57:49 +00:00
Jeff Cohen
b82309f1ab
An even better unbreakage...
...
llvm-svn: 32617
2006-12-15 22:57:14 +00:00
Evan Cheng
884bc09d10
Fix select_cc, select expansion to soft-fp bugs.
...
llvm-svn: 32616
2006-12-15 22:42:55 +00:00
Jeff Cohen
9f46963f11
Partial unbreak of VC++ (stream stuff has no easy fix).
...
llvm-svn: 32614
2006-12-15 21:47:01 +00:00
Reid Spencer
496222a1a8
Remove an extraneous { at the end of a block.
...
llvm-svn: 32613
2006-12-15 21:46:37 +00:00
Jim Laskey
a0850e98ee
Patterns no longer needed due to fix in the DAG combiner.
...
llvm-svn: 32612
2006-12-15 21:39:31 +00:00
Jim Laskey
26df19ace6
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