Commit Graph

16697 Commits

Author SHA1 Message Date
Reid Spencer
4fe16d607d Rename BoolTy as Int1Ty. Patch by Sheng Zhou.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33076 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11 18:21:29 +00:00
Zhou Sheng
34dceb4757 Remove unnecessary boolean type check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33075 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11 14:38:17 +00:00
Zhou Sheng
6b6b6ef167 For PR1043:
Merge ConstantIntegral and ConstantBool into ConstantInt.
Remove ConstantIntegral and ConstantBool from LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33073 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11 12:24:14 +00:00
Zhou Sheng
057809ac1c Fixed indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33072 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11 10:33:26 +00:00
Reid Spencer
11b910c71f Shut up a warning about signed/unsigned.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33071 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11 07:58:19 +00:00
Chris Lattner
ac618e6a9d simplify some logic further
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33069 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11 04:30:21 +00:00
Chris Lattner
22379bc7bb Recommit my previous patch with a bugfix: printInfoComment works on both
local and global values.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33068 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11 03:54:27 +00:00
Nick Lewycky
bc00fec835 Quiet compiler warning. The only reason the function is marked virtual
is so that it can be called from inside a debugger.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33067 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11 02:38:21 +00:00
Nick Lewycky
419c6f5ac8 New predicate simplifier!
Please do not enable, there is still some known miscompile problem.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33066 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11 02:32:38 +00:00
Devang Patel
25919cb780 Add PassManagerType enum.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33065 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11 01:10:25 +00:00
Reid Spencer
65de742b8a Avoid taking the address of a macro by checking to see if stdin is defined
or not. This allows DynamicLibrary.cpp to compile on Darwin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33064 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11 00:35:10 +00:00
Reid Spencer
5305478511 Implement better constant folding of unordered FCMP predicates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33063 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11 00:25:45 +00:00
Devang Patel
97149737f2 Robustify assingPassManager() for Module, Function and Basic Block
Passes.

Robustify PMStack.push()

Add dump() routine to print PMStack.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33062 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11 00:19:00 +00:00
Reid Spencer
11f457aad3 Allow LLI, in interpreter mode, to find stdin, stdout, and stderr. This is
a bit of a hack but it lets some of the llvm-test programs run.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33058 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-10 19:50:43 +00:00
Reid Spencer
162b02e327 Back out the last patch which is a nightly test killer. The assertion
in getLocalSlot fires on many, many values. It broke nearly all of
the dejagnu tests. Simple changes to the assertion did not fix the
problem.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33054 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-10 09:18:16 +00:00
Chris Lattner
b2b442f06d Last refactoring before PR645: split up getSlot into getLocalSlot and getGlobalSlot.
No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33053 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-10 07:01:46 +00:00
Chris Lattner
55e73a5493 eliminate some iterator gymnastics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33052 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-10 06:43:26 +00:00
Reid Spencer
7679693fdf Change the file header name as this file was renamed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33051 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-10 04:17:32 +00:00
Reid Spencer
93a0962e08 Rename Writer.cpp as CBackend.cpp so it doesn't conflict with Writer.cpp
in the bytecode writer library. This helps with debugging.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33050 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-10 04:16:17 +00:00
Chris Lattner
39ff1e2afc Fix a bug in heap-sra that caused compilation failure of office-ispell.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33043 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-09 23:29:37 +00:00
Reid Spencer
251f21492e For PR1099:
Invert the "isSigned" logic in calls to printType and printPrimitiveType.
We want variables to be declared unsigned by default so that signless
operators like + and - perform the unsigned operation that LLVM expects
by default. Parameters with the sext attribute will be declared signed and
signed instructions will case operand values to signed regardless of the
type of the variable. This passes all tests and fixes PR1099.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33039 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-09 17:09:09 +00:00
Chris Lattner
cf8790aaff Inline insertValue into CreateModuleSlot/CreateFunctionSlot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33038 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-09 08:04:59 +00:00
Chris Lattner
22990aae5c Remove a bunch of complex logic that is completely dead: duplicates can
never be inserted!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33037 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-09 07:58:11 +00:00
Chris Lattner
9446bbe7d4 Split CreateSlot into two versions, one for globals and one for function-local
values


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33036 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-09 07:55:49 +00:00
Chris Lattner
3a4621c5f6 Remove extraneous return value from insertValue and getOrCreateSlot. Since
getOrCreateSlot no longer gets the slot, rename it to CreateSlot.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33035 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-09 07:46:21 +00:00
Reid Spencer
30f9e27f64 For PR1099:
Partial fix for this PR. Default function parameters to signed integer, just
like everything else in CBE. The bug was caused by incorrectly introducing
parameter attributes feature by choosing "signed" parameter if the
SExtAttribute was specified. Howeer, if no attribute is specified, this
causes it to become unsigned which is incorrect. Reversing the logic so
that signedness is detected by "not ZExtAttribute" set fixes the issue.

This fixes 197.parser but there is more to do. Any comparison and possibly
other operators involving arguments may need to correctly cast the parameter
before its use, depending on the sign of the operator.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33034 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-09 06:38:06 +00:00
Evan Cheng
c8edc64188 Naming consistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33026 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 23:55:53 +00:00
Evan Cheng
c62d4bb695 Fix for PR1075: bottom-up register-reduction scheduling actually increases register pressure.
- Fixed bugs in sethi-ullman number computation and priority queue comparison
functions.
- Separate code that handles priority computation special cases from SU number computation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33025 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 23:50:38 +00:00
Chris Lattner
ddae4bd683 Implement some trivial FP foldings when -enable-unsafe-fp-math is specified.
This implements CodeGen/PowerPC/unsafe-math.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33024 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 23:04:05 +00:00
Jim Laskey
6488a078ba Need to handle static declarations properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33022 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 22:15:18 +00:00
Jeff Cohen
dfc12993b9 Unbreak VC++ build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33021 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 20:17:17 +00:00
Reid Spencer
877e7ce051 Parameter attributes are part of a FunctionType and deserve to be factored
into comparisons of two FunctionTypes. Make it so.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33020 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 19:41:01 +00:00
Devang Patel
09e6e4303f Add PMStack, a Pass Manager stack.
Eventually, Top level pass managers  will use this to keep track of
active pass managers. Eass pass will also learn how to find appropriate
manager from these managers stack.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33018 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 19:29:38 +00:00
Andrew Lenharth
43f344a266 And asm writing for packed struct initializers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33016 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 18:21:30 +00:00
Andrew Lenharth
1acc5a4e87 Make packed structs use packed initialiers for consistency
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33015 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 18:16:47 +00:00
Reid Spencer
abaa8ca433 Comparison of primitive type sizes should now be done in bits, not bytes.
This patch converts getPrimitiveSize to getPrimitiveSizeInBits where it is
appropriate to do so (comparison of integer primitive types).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33012 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 16:32:00 +00:00
Reid Spencer
ac8cdf79e7 For PR1097:
Enable complex addressing modes on 64-bit platforms involving two induction
variables by keeping a size and scale in 64-bits not 32.
Patch by Dan Gohman.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33011 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 16:17:51 +00:00
Reid Spencer
fbe7ae9e3c For PR1090:
Clean up the definitions of the helper functions per Chris' review
suggestions so they are easier to read.

For PR1091:
Print minimum signed integer values as unsigned so that we get no warnings
from the C compiler about constant ranges and value comparisons.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33010 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 08:00:00 +00:00
Reid Spencer
b801a27121 Fix PR1090:
Implemented some llvm_fcmp_{pred} functions at the start of the function bodies
and use them for fcmp instructions and constant expressions. These help
implement the ordered and unordered comparisons necessary for correct exectuion
of these comparisons.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33007 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 06:58:32 +00:00
Reid Spencer
ca7ad8942a Fix a bug in an assert that would never trigger.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33005 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 05:34:39 +00:00
Reid Spencer
e7ca042730 Convert uses of getPrimitiveSize that should be getPrimitiveSizeInBits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33003 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 01:26:33 +00:00
Reid Spencer
3c628627ea Types should be const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33001 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 21:45:41 +00:00
Chris Lattner
ba8b327f67 this pass is unused
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32998 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 18:12:43 +00:00
Chris Lattner
f01da5939d llvm 2.0 doesn't support llvm.isunordered.*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32994 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 08:52:43 +00:00
Chris Lattner
a4810b52d0 remove support for llvm.isunordered
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32992 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 08:37:22 +00:00
Chris Lattner
257cbf7a8d remove llvm.isunordered
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32991 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 08:19:47 +00:00
Chris Lattner
b76efb71d4 Change the interface to Module::getOrInsertFunction to be easier to use,to resolve PR1088, and to help PR411.
This simplifies many clients also


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32989 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 08:12:01 +00:00
Chris Lattner
70d130516a Change the interface to Module::getOrInsertFunction to be easier to use,
to resolve PR1088, and to help PR411.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32988 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 08:09:25 +00:00
Chris Lattner
a121fddf3c prepare for adjustment to getOrInsertFunction method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32985 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 07:54:34 +00:00
Chris Lattner
52a457c7e2 relax type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32983 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 07:24:32 +00:00