Commit Graph

4668 Commits

Author SHA1 Message Date
Reid Spencer
c10305743c For PR1043:
This is the final patch for this PR. It implements some minor cleanup
in the use of IntegerType, to wit:
1. Type::getIntegerTypeMask -> IntegerType::getBitMask
2. Type::Int*Ty changed to IntegerType* from Type*
3. ConstantInt::getType() returns IntegerType* now, not Type*

This also fixes PR1120.

Patch by Sheng Zhou.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33370 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-19 21:13:56 +00:00
Anton Korobeynikov
8cd4c3e653 Adding disassembler interface and external hook to udis86 library.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33358 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-19 17:25:17 +00:00
Reid Spencer
7808dcba05 Provide an isPowerOf2ByteWidth method for the IntegerType class. This will
mostly be used by back ends that wish to distinguish between integer types
that fit evenly within a natural integer type and those that don't.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33328 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-18 02:59:54 +00:00
Bill Wendling
c904a5b925 Have the OutputBuffer take the is64Bit and isLittleEndian booleans.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33316 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-18 01:23:11 +00:00
Chris Lattner
393a8eea3c add new JumpTableSpecialLabelPrefix hook to asmprinter for jumptable emission.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33314 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-18 01:12:56 +00:00
Reid Spencer
a10dc506c0 For PR1028:
Add the llvm.stacksave and llvm.stackrestore intrinsics that correspond
to the GCC builtins __builtin_stack_save and __builtin_stack_restore. This
allows the CBE to execute these builtins, and fixes:

   test/CodeGen/CBackend/2007-01-17-StackSaveNRestore.ll
   External/SPEC/CINT2000/176.gcc (CBE)

Patch by Gordon Henriksen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33313 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 23:33:20 +00:00
Bill Wendling
203d3e4386 Changed to use the OutputBuffer instead of the methods in MachO and ELF
writers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33311 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 22:22:31 +00:00
Bill Wendling
f341ccbff9 Refactored output buffer methods from MachO and ELF writers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33310 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 22:17:24 +00:00
Devang Patel
be1ffc6b8d Update assignPassManager() signature to allow selection of preferred
pass manager type. This allows new FPPassManager to select Call Graph
Pass Manager (if available) as its parent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33306 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 20:30:17 +00:00
Chris Lattner
c099e49f57 document that BSSSection can be null.
Add new ZeroFillDirective directive.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33301 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 17:42:30 +00:00
Anton Korobeynikov
292a007c94 Document flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33300 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 10:40:54 +00:00
Anton Korobeynikov
5032e5a613 * Fix one more bug in PIC codegen: extra load is needed for *all*
non-statics.
* Introduce new option to output zero-initialized data to .bss section.
This can reduce size of binaries. Enable it by default for ELF &
Cygwin/Mingw targets. Probably, Darwin should be also added.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33299 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 10:33:08 +00:00
Bill Wendling
e911615c47 Revert patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33298 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 09:06:13 +00:00
Chris Lattner
c49e1eb8cc make doxygen comment much better. Patch by B. Scott Michel!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33294 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 07:28:48 +00:00
Bill Wendling
3007f7a30e The TargetObjInfo object goes here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33288 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 03:48:29 +00:00
Bill Wendling
99b10272f9 Removed methods which are now in the respective TargetObjInfo implementations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33287 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 03:47:54 +00:00
Bill Wendling
34f03fff2d New "TargetObjInfo" class. This holds information that the object writers will
use to write things to the file. It's abstract so each target should implement
its own version for each writer type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33286 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 03:46:30 +00:00
Reid Spencer
0a11af1f73 For PR1117:
Expose the previously hidden checkCast function as CastInst::castIsValid.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33282 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 02:46:11 +00:00
Reid Spencer
cf48cab945 For PR1094:
Make the SetVector::iterator be the vector's const_iterator.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33279 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 02:22:18 +00:00
Reid Spencer
34341b09f1 Remove unused forward class declarations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33276 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 01:49:59 +00:00
Devang Patel
9d133e150f Undo last check-in.
Remove setupPassManager() and its use.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33270 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-16 21:43:18 +00:00
Devang Patel
531f01f878 Setup pass manager before scheduling required analysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33262 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-16 19:46:09 +00:00
Bill Wendling
eb9a42c90b Fix for PR1095:
LLVM would miscompile ASM dialects when compiling for PPC. Added dialects for
the X86 and PPC backends. It defaults to "0", the first variant of a compound
inline asm expression.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33246 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-16 03:42:04 +00:00
Devang Patel
8f3f3d103a Code refactoring.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33245 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-16 02:00:38 +00:00
Devang Patel
66eeb49d8f Remove extra white spaces. Fix comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33244 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-15 23:06:56 +00:00
Chris Lattner
42a7551725 rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.
rename Type::getIntegralTypeMask to Type::getIntegerTypeMask.

This makes naming much more consistent.  For example, there are now no longer any
instances of IntegerType that are not considered isInteger! :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33225 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-15 02:27:26 +00:00
Chris Lattner
b2f3e703bc Update code to eliminate calls to isInteger, calling isIntegral instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33220 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-15 01:58:56 +00:00
Reid Spencer
488228ceb1 Primitive types don't include integers any more, adjust.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33209 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-14 21:46:42 +00:00
Chris Lattner
b769d5657e add accessors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33207 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-14 19:41:24 +00:00
Chris Lattner
9784bc73c3 add a new HiddenDirective member for handling visibility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33197 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-14 06:27:21 +00:00
Jim Laskey
569cc890e8 virtual not needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33161 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 23:39:50 +00:00
Reid Spencer
c254b1d666 Don't #include DerivedTypes.h in this header. Make adjustments to
compensate. Move a function out of line to TargetLowering.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33153 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 23:21:42 +00:00
Evan Cheng
495600120e - Move RTLIB::Libcall enum to a separate file.
- Code clean up.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33148 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 22:49:32 +00:00
Jim Laskey
fa30182eb8 Allow isAllOnesValue testing on packed constants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33146 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 22:39:14 +00:00
Evan Cheng
9f7f49caa4 Silence a bogus compiler warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33145 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 22:30:07 +00:00
Chris Lattner
a82d407850 inline isIntegral to make this method look like classof for all other
derived types


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33144 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 22:11:53 +00:00
Devang Patel
e24e0e1244 s/addPassToManager/add/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33138 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 20:07:16 +00:00
Anton Korobeynikov
7f70559bc4 * PIC codegen for X86/Linux has been implemented
* PIC-aware internal structures in X86 Codegen have been refactored
* Visibility (default/weak) has been added
* Docs fixes (external weak linkage, visibility, formatting)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33136 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 19:20:47 +00:00
Devang Patel
ab7752c149 Move PMTopLevelManager, PMDataManager and FPPassManger classes into
new PassManagers.h header.

This opens door for implementing CGPassManager in IPA library.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33135 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 18:52:44 +00:00
Reid Spencer
a54b7cbd45 For PR1064:
Implement the arbitrary bit-width integer feature. The feature allows
integers of any bitwidth (up to 64) to be defined instead of just 1, 8,
16, 32, and 64 bit integers.

This change does several things:
1. Introduces a new Derived Type, IntegerType, to represent the number of
   bits in an integer. The Type classes SubclassData field is used to
   store the number of bits. This allows 2^23 bits in an integer type.
2. Removes the five integer Type::TypeID values for the 1, 8, 16, 32 and
   64-bit integers. These are replaced with just IntegerType which is not
   a primitive any more.
3. Adjust the rest of LLVM to account for this change.

Note that while this incremental change lays the foundation for arbitrary
bit-width integers, LLVM has not yet been converted to actually deal with
them in any significant way. Most optimization passes, for example, will
still only deal with the byte-width integer types.  Future increments
will rectify this situation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33113 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 07:05:14 +00:00
Reid Spencer
579dca12c2 Implement review feedback for the ConstantBool->ConstantInt merge. Chris
recommended that getBoolValue be replaced with getZExtValue and that
get(bool) be replaced by get(const Type*, uint64_t). This implements
those changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33110 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 04:24:46 +00:00
Evan Cheng
56966225d1 Store default libgcc routine names and allow them to be redefined by target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33105 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 02:11:51 +00:00
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
9c799ffbbe Fixed a bug in ConstantInt::Inverted().
Modified comment of that method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33074 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11 14:31:10 +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
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
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
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
Chris Lattner
fd0cf61670 remove an old instrumentation pass that is not used anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32997 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 18:12:13 +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