Commit Graph

16630 Commits

Author SHA1 Message Date
Evan Cheng
c2b861da18 Fix naming inconsistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32823 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-02 21:33:40 +00:00
Evan Cheng
ad93d7fda5 - Fixing naming inconsistency: calleesave -> calleesaved.
- Make use of spillCalleeSavedRegisters() and restoreCalleeSavedRegisters().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32822 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-02 21:31:15 +00:00
Reid Spencer
ee5d25e5cc Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32803 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 22:26:06 +00:00
Reid Spencer
6359618e43 Fix a cut-and-paste bug for processing of InvokeInst parameter attributes.
The lookup of parameter attributes was offset by two because of the
additional operands in an invoke instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32801 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 22:17:01 +00:00
Reid Spencer
c6c59fd89f Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32800 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 21:47:02 +00:00
Reid Spencer
e03969f816 Remove an extra semi-colon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32799 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 21:46:36 +00:00
Reid Spencer
cc615c38b1 Fix a bug in comparison of GEP indices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32798 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 21:43:30 +00:00
Reid Spencer
71305d760e Add a missing colon. Noticed by Jeff Cohen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32796 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 21:25:25 +00:00
Rafael Espindola
9985f9f61e implement missing compares
patch by Lauro
bug fixed by me


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32795 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 18:52:39 +00:00
Reid Spencer
1fd79b8c42 Fix a bug in getParamAttrs where an invalid value would be returned if the
index passed in was out of range for the number of parameter attributes set.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32794 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 17:50:33 +00:00
Reid Spencer
47857812e2 For PR950:
Three changes:
1. Convert signed integer types to signless versions.
2. Implement the @sext and @zext parameter attributes. Previously the
   type of an function parameter was used to determine whether it should
   be sign extended or zero extended before the call. This information is
   now communicated via the function type's parameter attributes.
3. The interface to LowerCallTo had to be changed in order to accommodate
   the parameter attribute information. Although it would have been
   convenient to pass in the FunctionType itself, there isn't always one
   present in the caller. Consequently, a signedness indication for the
   result type and for each parameter was provided for in the interface
   to this method. All implementations were changed to make the adjustment
   necessary.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32788 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 05:55:36 +00:00
Reid Spencer
e49661bdf5 For PR950:
Convert signed integer types to signless ones.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32787 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 05:51:36 +00:00
Reid Spencer
c5b206b6be For PR950:
This patch replaces signed integer types with signless ones:
1. [US]Byte -> Int8
2. [U]Short -> Int16
3. [U]Int   -> Int32
4. [U]Long  -> Int64.
5. Removal of isSigned, isUnsigned, getSignedVersion, getUnsignedVersion
   and other methods related to signedness. In a few places this warranted
   identifying the signedness information from other sources.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32785 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 05:48:39 +00:00
Reid Spencer
88cfda2122 For PR950:
Update for signless integer types and parameter attribute implementation.
Of significant note:
  1. This changes the bytecode format yet again.
  2. There are 1/2 as many integer type planes (this is a good thing)
  3. GEP indices now use only 1 bit to identify their type which means
     more GEP instructions won't be relegated to format 0 (size win)
  4. Parameter attributes are implemented but currently being stored
     verbosely for each function type. Some other day this needs to be
     optimized for size.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32783 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 05:44:24 +00:00
Reid Spencer
1431061ebb For PR950:
Regenerate


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32782 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 05:40:51 +00:00
Reid Spencer
e1553cc956 For PR950:
Major reorganization. This patch introduces the signedness changes for
the new integer types (i8, i16, i32, i64) which replace the old signed
versions (ubyte, sbyte, ushort, short, etc). This patch also implements
the function type parameter attributes feature. Together these conspired
to introduce new reduce/reduce errors into the grammar. Consequently, it
was necessary to introduce a new keyword into the grammar in order to
disambiguate. Without this, yacc would make incorrect shift/reduce and
reduce/reduce decisions and fail to parse the intended assembly.

Changes in assembly:

1. The "implementation" keyword is superfluous but still supported. You
   can use it as a sentry which will ensure there are no remaining up
   reference types. However, this is optional as those checks are also
   performed elsewhere.

2. Parameter attributes are now implemented using an at sign to
   indicate the attribute. The attributes are placed after the type
   in a function declaration or after the argument value in a function
   call. For example:
      i8 @sext %myfunc(i16 @zext)
      call i8 @sext %myfunc(i16 @zext %someVal)
   The facility is available for supporting additional attributes and
   they can be combined using the @(attr1,attr2,attr3) syntax. Right
   now  the only two supported are @sext and @zext

3. Functions must now be defined with the "define" keyword which is
   analagous to the "declare" keyword for function declarations. The
   introduction of this keyword disambiguates situations where a
   named result type is confused with a new type or gvar definition.
   For example:
      %MyType = type i16
      %MyType %func(%MyType) { ... }
   With the introduction of optional parameter attributes between
   the function name and the function result type, yacc will pick
   the wrong rule to reduce unless it is disambiguated with "define"
   before the function definition, as in:
      define %MyType @zext %func(%MyType %someArg) { ... }


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32781 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 05:40:12 +00:00
Reid Spencer
79e21d338c For PR950:
Change signed integer type names to unsigned equivalents.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32780 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 05:26:44 +00:00
Reid Spencer
9c2e86a8d0 For PR950:
Implement signless integer types and FunctionType parameter attributes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32779 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 05:25:34 +00:00
Reid Spencer
bd5db8e29b For PR950:
* Change integer type name from signed to signless
* Implement printing of FunctionType parameter attributes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32778 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 05:24:50 +00:00
Reid Spencer
6fd36abf5e Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32772 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-29 20:35:03 +00:00
Reid Spencer
b951bc0283 For PR950:
Remove all grammar conflicts from assembly parsing.  This change involves:
1. Making the "type" keyword not a primitive type (removes several
   reduce/reduce conflicts)
2. Being more specific about which linkage types are allowed for functions
   and global variables. In particular "appending" can no longer be
   specified for a function. A differentiation was made between the various
   internal and external linkage types.
3. Introduced the "define" keyword which is now required when defining a
   function. This disambiguates several cases where a named function return
   type could get confused with the definition of a new type. Using the
   keyword eliminates all shift/reduce conflicts and the remaining
   reduce/reduce conflicts.

These changes are necessary to implement the function parameter attributes
that will be introduced soon. Adding the function parameter attributes in
the presence of the shift/reduce and reduce/reduce conflicts led to severe
ambiguities that caused the parser to report syntax errors that needed to
be resolved. This patch resolves them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32770 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-29 20:29:48 +00:00
Rafael Espindola
0cc2bd12d2 fix comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32767 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-29 14:28:12 +00:00
Lauro Ramos Venancio
da4842e266 Define StaticCtorsSection and StaticDtorsSection for ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32763 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-28 13:13:00 +00:00
Lauro Ramos Venancio
301009a0fc Implement SELECT_CC (f32/f64) for ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32762 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-28 13:11:14 +00:00
Rafael Espindola
6547c55988 remove duplicated line
bug noticed by Lauro


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32761 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-28 12:51:40 +00:00
Lauro Ramos Venancio
a8f9f4af54 This patch defines extloadi1 and fixes an internal compiler error on
arm.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32760 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-26 19:30:42 +00:00
Reid Spencer
b913bbaa41 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32759 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-24 18:52:08 +00:00
Reid Spencer
4fa021a1a9 Fix some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32758 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-24 18:42:29 +00:00
Reid Spencer
0f9d82c5c4 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32757 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-24 00:40:59 +00:00
Reid Spencer
b3307b232a Shut up some compilers that can't accurately analyze variable usage
correctly and emit "may be used uninitialized" warnings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32756 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-23 19:17:57 +00:00
Reid Spencer
1b0d847874 For PR1065:
Don't allow CmpInst instances to be processed in FoldSelectOpOp because
you can't easily swap their operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32753 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-23 18:58:04 +00:00
Reid Spencer
283e20708b Don't overload var names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32752 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-23 10:21:26 +00:00
Reid Spencer
e4d87aa2de 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32751 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-23 06:05:41 +00:00
Chris Lattner
add2bd7f59 add a simple fast-path for dead allocas
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32750 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-22 23:14:42 +00:00
Devang Patel
c7d0f4be88 ModulePass and ImmutablePass. Force out of line virtual method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32748 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-22 22:49:00 +00:00
Anton Korobeynikov
2b2bc68884 Refactored JIT codegen for mingw32. Now we're using standart relocation
type for distinguish JIT & non-JIT instead of "dirty" hacks :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32745 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-22 22:29:05 +00:00
Jim Laskey
ee5f9274b9 Need to walk the derived chain of typedefs to get actual size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32744 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-22 20:03:42 +00:00
Evan Cheng
d472ad7c7c Debug dump error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32743 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-22 02:04:05 +00:00
Chris Lattner
b9853ebc7b add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32741 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-22 01:03:22 +00:00
Chris Lattner
1a199de813 Fix for ARM weak symbols, patch by Lauro Ramos Venancio!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32740 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-21 22:59:58 +00:00
Jim Laskey
bf1118285c Changes from Nick Lewycky with a simplified PPCTargetAsmInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32735 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-21 20:26:09 +00:00
Reid Spencer
246dd65a13 Just print integer constants as signed values. The actual signedness
doesn't matter as it is determined in the way the constant is used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32733 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-21 19:04:23 +00:00
Reid Spencer
d377350718 Add a FIXME about signedness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32732 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-21 18:59:16 +00:00
Reid Spencer
eefef64e59 Simplify all the casting business and get rid of isSigned().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32731 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-21 08:28:31 +00:00
Reid Spencer
06e3f4ee7e Remove isSigned calls via foreknowledge of main's argument types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32730 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-21 07:49:49 +00:00
Reid Spencer
a2913eea9d Get rid of a useless if statement whose then and else blocks were identical.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32729 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-21 07:15:54 +00:00
Reid Spencer
2e20d39493 Add some comments about things that can go away once signless types are in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32727 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-21 06:43:46 +00:00
Devang Patel
1336a6bf06 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32726 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-21 00:16:50 +00:00
Jim Laskey
2aa14aad98 Oops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32724 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-20 21:35:00 +00:00
Jim Laskey
40ee69f3ca Original patch was overly complicated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32723 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-20 21:33:34 +00:00
Chris Lattner
62d75e7695 Fix Regression/Verifier/invoke-1.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32722 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-20 21:20:13 +00:00
Jim Laskey
b608a4dd4c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32721 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-20 20:56:46 +00:00
Anton Korobeynikov
48c8e3de2f Fixed 80 cols & style violation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32720 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-20 20:40:30 +00:00
Chris Lattner
19591b3aaf Revert the previous patch which was incorrect. This unbreaks eon, but rebreaks
invoke-1.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32718 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-20 19:50:15 +00:00
Reid Spencer
9ffad0a43f 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32716 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-20 17:20:09 +00:00
Chris Lattner
3bad2533bb 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32715 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-20 06:21:33 +00:00
Evan Cheng
0b4f80ee89 getLoad() and getStore() calls missed SVOffset operand. Thanks to Dan Gohman
for pointing it out!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32712 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-20 01:27:29 +00:00
Anton Korobeynikov
15fccf1d93 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 :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32711 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-20 01:03:20 +00:00
Chris Lattner
0a3615246f eliminate constructor from Statistic class. It is now impossible to get a
static constructor for them :).   Transition complete.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32710 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 23:17:40 +00:00
Chris Lattner
1c560adfd1 switch statistics over to not use static ctors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32709 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 23:16:47 +00:00
Chris Lattner
95b2c7da5e eliminate static ctors for Statistic objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32703 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 22:59:26 +00:00
Chris Lattner
cecf56b069 elimiante Statistic static ctors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32702 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 22:56:53 +00:00
Chris Lattner
36343735cb remove static ctors from Statistic objects
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32700 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 22:43:32 +00:00
Chris Lattner
cd3245ac45 Eliminate static ctors from Statistics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32698 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 22:41:21 +00:00
Chris Lattner
3b27d68c6a eliminate static ctors from Statistics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32697 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 22:30:33 +00:00
Chris Lattner
cbfdd1f840 eliminate static ctor from example.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32696 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 22:24:09 +00:00
Chris Lattner
61bc8f8ca4 remove dead statistic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32695 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 22:23:21 +00:00
Chris Lattner
d216e8ba60 switch more statistics over to STATISTIC, eliminating static ctors. Also,
delete some dead ones.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32694 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 22:17:40 +00:00
Chris Lattner
86453c52ba Eliminate static ctors due to Statistic objects
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32693 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 22:09:18 +00:00
Chris Lattner
438e08e357 Convert more Statistic's over to STATISTIC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32692 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 21:49:03 +00:00
Chris Lattner
0e5f499638 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32690 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 21:40:18 +00:00
Evan Cheng
a70d14bd16 Fix for PR1062 by Dan Gohman.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32688 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 21:31:42 +00:00
Chris Lattner
ecb2768758 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32687 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 21:27:47 +00:00
Reid Spencer
9d908e8ca0 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32686 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 21:16:35 +00:00
Anton Korobeynikov
24287ddb81 Fix for PR1059: http://llvm.org/PR1059
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32685 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 21:04:20 +00:00
Devang Patel
a68941b2d4 Now, there is additional layer, referred in the comment,
in place to handle this correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32684 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 20:12:38 +00:00
Devang Patel
5f4ddf517f 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32679 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 19:46:59 +00:00
Chris Lattner
21847f43e8 The x86-64 target machine should be used for amd64-* target triples.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32678 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 19:40:09 +00:00
Chris Lattner
0bb3af9ec1 Fix PR1061 and CodeGen/X86/2006-12-19-IntelSyntax.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32676 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 19:29:58 +00:00
Anton Korobeynikov
cd79df01c2 Partly fixed JITing on mingw32 platform. The support is not full due to
absence of dllimport JIT codegen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32673 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 15:24:18 +00:00
Reid Spencer
85e36e474d Clean up ConstantFoldCastInstruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32672 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 07:41:40 +00:00
Reid Spencer
390437fc6d 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32671 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 03:15:47 +00:00
Evan Cheng
7df28dc9d7 May need to promote the operand (either sign_extend_inreg or and) before
expanding a {s|u}int_to_fp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32665 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 01:44:04 +00:00
Reid Spencer
9b11d518ae 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32663 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 01:28:19 +00:00
Chris Lattner
75de5ab9f5 Fix a bug in GetConstantFactor for affine expressions, in which the existing
code was wrong for things like 3+4*i.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32662 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 01:16:02 +00:00
Reid Spencer
c597a888c0 Remove a useless statement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32660 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 23:40:19 +00:00
Evan Cheng
722cb36069 LegalizeSetCCOperands() may end up inserting libcalls. They need to be
properly serialized. Do not clear LastCallSEQ_END until that is done.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32659 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 22:55:34 +00:00
Reid Spencer
d71b620c6c For PR1042:
Fix a thinko. We want to check the second case if the first cast *didn't*
trigger.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32657 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 21:56:29 +00:00
Rafael Espindola
3ef39ca6a1 macros -> Inline functions
Lauros's patch


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32656 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 11:07:09 +00:00
Reid Spencer
1bd82a5c65 Remove the createInferredCast methods now that their last uses have been
removed. All casting is now explicit and not inferred by VMCore.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32655 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 08:52:59 +00:00
Reid Spencer
8a903db499 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32654 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 08:47:13 +00:00
Reid Spencer
d97321ceb3 Remove the two-argument (inferred cast) form of ConstantExpr::getCast now
that its last uses have been removed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32653 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 08:18:46 +00:00
Reid Spencer
dc26a9b840 Convert the last use of two-argument ConstantExpr::getCast into another
form so we can remove that method from ConstantExpr.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32652 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 08:16:27 +00:00
Reid Spencer
fdf15e1dc8 Revert last patch. ConstantInt isn't quite ready for signlessness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32650 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 04:22:56 +00:00
Rafael Espindola
15404d060b move ExtWeakSymbols to AsmPrinter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32648 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 03:37:18 +00:00
Reid Spencer
d54d8fa45a 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32646 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 01:11:03 +00:00
Chris Lattner
c1f400ccdd Fix PR1057 (compilation on macos 10.3), patch by Scott Michel!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32644 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-17 21:04:02 +00:00
Reid Spencer
225866469f Use a predicate function to identify bitcast of fp and integer instead of
repeating the logic in two different parts of the code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32643 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-17 20:24:50 +00:00
Reid Spencer
941cfda9c5 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32642 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-17 18:50:51 +00:00
Bill Wendling
f2174da713 Fixed so that it dereferences the ostream pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32640 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-17 11:15:53 +00:00