1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 13:02:52 +02:00
Commit Graph

4348 Commits

Author SHA1 Message Date
Bill Wendling
19aee9b178 Refactored output buffer methods from MachO and ELF writers.
llvm-svn: 33310
2007-01-17 22:17:24 +00:00
Devang Patel
866ecabe21 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.

llvm-svn: 33306
2007-01-17 20:30:17 +00:00
Chris Lattner
6ab744575c document that BSSSection can be null.
Add new ZeroFillDirective directive.

llvm-svn: 33301
2007-01-17 17:42:30 +00:00
Anton Korobeynikov
cac2ebfdee Document flag
llvm-svn: 33300
2007-01-17 10:40:54 +00:00
Anton Korobeynikov
2509765bef * 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.

llvm-svn: 33299
2007-01-17 10:33:08 +00:00
Bill Wendling
6cf6bb2d24 Revert patch.
llvm-svn: 33298
2007-01-17 09:06:13 +00:00
Chris Lattner
fb5249893e make doxygen comment much better. Patch by B. Scott Michel!
llvm-svn: 33294
2007-01-17 07:28:48 +00:00
Bill Wendling
ec27b2bc2f The TargetObjInfo object goes here.
llvm-svn: 33288
2007-01-17 03:48:29 +00:00
Bill Wendling
d9649bf5bb Removed methods which are now in the respective TargetObjInfo implementations.
llvm-svn: 33287
2007-01-17 03:47:54 +00:00
Bill Wendling
5789edd7f5 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.

llvm-svn: 33286
2007-01-17 03:46:30 +00:00
Reid Spencer
d98055f3fe For PR1117:
Expose the previously hidden checkCast function as CastInst::castIsValid.

llvm-svn: 33282
2007-01-17 02:46:11 +00:00
Reid Spencer
f1f0b585a8 For PR1094:
Make the SetVector::iterator be the vector's const_iterator.

llvm-svn: 33279
2007-01-17 02:22:18 +00:00
Reid Spencer
be9cfd1b85 Remove unused forward class declarations.
llvm-svn: 33276
2007-01-17 01:49:59 +00:00
Devang Patel
e3e4fcb70f Undo last check-in.
Remove setupPassManager() and its use.

llvm-svn: 33270
2007-01-16 21:43:18 +00:00
Devang Patel
afc2e45d40 Setup pass manager before scheduling required analysis.
llvm-svn: 33262
2007-01-16 19:46:09 +00:00
Bill Wendling
cfdd717db5 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.

llvm-svn: 33246
2007-01-16 03:42:04 +00:00
Devang Patel
2d421d58d6 Code refactoring.
llvm-svn: 33245
2007-01-16 02:00:38 +00:00
Devang Patel
b61a40bc5a Remove extra white spaces. Fix comments.
llvm-svn: 33244
2007-01-15 23:06:56 +00:00
Chris Lattner
c5e1611848 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! :)

llvm-svn: 33225
2007-01-15 02:27:26 +00:00
Chris Lattner
4d7eed35ae Update code to eliminate calls to isInteger, calling isIntegral instead.
llvm-svn: 33220
2007-01-15 01:58:56 +00:00
Reid Spencer
884f048f42 Primitive types don't include integers any more, adjust.
llvm-svn: 33209
2007-01-14 21:46:42 +00:00
Chris Lattner
018d873ce8 add accessors
llvm-svn: 33207
2007-01-14 19:41:24 +00:00
Chris Lattner
a8f6e90cac add a new HiddenDirective member for handling visibility.
llvm-svn: 33197
2007-01-14 06:27:21 +00:00
Jim Laskey
3410ca8bf4 virtual not needed.
llvm-svn: 33161
2007-01-12 23:39:50 +00:00
Reid Spencer
4fe8454735 Don't #include DerivedTypes.h in this header. Make adjustments to
compensate. Move a function out of line to TargetLowering.cpp

llvm-svn: 33153
2007-01-12 23:21:42 +00:00
Evan Cheng
a8ed507f15 - Move RTLIB::Libcall enum to a separate file.
- Code clean up.

llvm-svn: 33148
2007-01-12 22:49:32 +00:00
Jim Laskey
ee29cc6016 Allow isAllOnesValue testing on packed constants
llvm-svn: 33146
2007-01-12 22:39:14 +00:00
Evan Cheng
3e3e3865b8 Silence a bogus compiler warning.
llvm-svn: 33145
2007-01-12 22:30:07 +00:00
Chris Lattner
936c770e83 inline isIntegral to make this method look like classof for all other
derived types

llvm-svn: 33144
2007-01-12 22:11:53 +00:00
Devang Patel
347efe4ce7 s/addPassToManager/add/g
llvm-svn: 33138
2007-01-12 20:07:16 +00:00
Anton Korobeynikov
548b9af9c2 * 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)

llvm-svn: 33136
2007-01-12 19:20:47 +00:00
Devang Patel
9afb283500 Move PMTopLevelManager, PMDataManager and FPPassManger classes into
new PassManagers.h header.

This opens door for implementing CGPassManager in IPA library.

llvm-svn: 33135
2007-01-12 18:52:44 +00:00
Reid Spencer
373d2bccea 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.

llvm-svn: 33113
2007-01-12 07:05:14 +00:00
Reid Spencer
3d986f6487 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.

llvm-svn: 33110
2007-01-12 04:24:46 +00:00
Evan Cheng
032a597692 Store default libgcc routine names and allow them to be redefined by target.
llvm-svn: 33105
2007-01-12 02:11:51 +00:00
Reid Spencer
f3265181e2 Rename BoolTy as Int1Ty. Patch by Sheng Zhou.
llvm-svn: 33076
2007-01-11 18:21:29 +00:00
Zhou Sheng
3c49580e44 Fixed a bug in ConstantInt::Inverted().
Modified comment of that method.

llvm-svn: 33074
2007-01-11 14:31:10 +00:00
Zhou Sheng
23d24526b2 For PR1043:
Merge ConstantIntegral and ConstantBool into ConstantInt.
Remove ConstantIntegral and ConstantBool from LLVM.

llvm-svn: 33073
2007-01-11 12:24:14 +00:00
Devang Patel
e485c421c1 Add PassManagerType enum.
llvm-svn: 33065
2007-01-11 01:10:25 +00:00
Devang Patel
a0b4424ed4 Robustify assingPassManager() for Module, Function and Basic Block
Passes.

Robustify PMStack.push()

Add dump() routine to print PMStack.

llvm-svn: 33062
2007-01-11 00:19:00 +00:00
Devang Patel
e0b89a869d 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.

llvm-svn: 33018
2007-01-08 19:29:38 +00:00
Chris Lattner
d5cd984a0e remove an old instrumentation pass that is not used anymore.
llvm-svn: 32997
2007-01-07 18:12:13 +00:00
Chris Lattner
3e42a4147a llvm 2.0 doesn't support llvm.isunordered.*
llvm-svn: 32994
2007-01-07 08:52:43 +00:00
Chris Lattner
fed811a032 Change the interface to Module::getOrInsertFunction to be easier to use,
to resolve PR1088, and to help PR411.

llvm-svn: 32988
2007-01-07 08:09:25 +00:00
Reid Spencer
cdaf88ff9d For PR411:
Take an incremental step towards type plane elimination. This change
separates types from values in the symbol tables by finally making use
of the TypeSymbolTable class. This yields more natural interfaces for
dealing with types and unclutters the SymbolTable class.

llvm-svn: 32956
2007-01-06 07:24:44 +00:00
Evan Cheng
38cb858ee5 - Remove isSetCCExpensive() etc. These are no longer used.
- Add isSelectExpensive() etc. It's used to tell codegen that select is expensive for a given target, avoid using it if possible. Currently it's only
used to expand FCOPYSIGN.

llvm-svn: 32939
2007-01-05 23:31:08 +00:00
Devang Patel
c1627f6538 1) Remove old AnalysisResolver.
2) Rename AnalysisResolver_New as AnalysisResolver

llvm-svn: 32938
2007-01-05 22:47:07 +00:00
Devang Patel
fcddd83bfc Remove old pass manager.
llvm-svn: 32927
2007-01-05 20:16:23 +00:00
Reid Spencer
4f14887126 Change the syntax for parameter attributes:
1. The @ sign is no longer necessary.
2. We now support "function attributes" as parameter attribute 0.
3. Instead of locating the return type attributes after the type of a
   function result, they are now located after the function header's
   closing paranthesis and before any alignment or section options.
4. The way has been prepared for a new "noreturn" function attribute but
   there is no support for recognizing it in the lexer nor doing anything
   with it if it does get set.
5. The FunctionType::getParamAttrsText method now has support for
   returning multiple attributes. This required a change in its interface.

I'm unhappy that this change leads to 6 new shift/reduce conflicts, but
in each case bison's decision to choose the shift is correct so there
shouldn't be any damage from these conflicts.

llvm-svn: 32904
2007-01-05 17:06:19 +00:00
Chris Lattner
b0d835856b remove the 'protected' workaround now that we don't care about gcc 2.95 anymore.
Reid already did this for FunctionType, this just cleans the rest up.

llvm-svn: 32877
2007-01-04 17:50:42 +00:00
Chris Lattner
29a821859e Now that setcondinst has been eliminated, we can mark Value::SubclassID
const and remove the ugly mutator methods.

llvm-svn: 32860
2007-01-04 02:15:37 +00:00
Chris Lattner
d9342d1db3 Add a new ConstantPacked::getAllOnesValue method
llvm-svn: 32856
2007-01-04 01:49:26 +00:00
Devang Patel
6612240497 Enable new pass manager, which was accidentally disabled.
llvm-svn: 32855
2007-01-04 01:27:03 +00:00
Bill Wendling
05f7a367a2 The previous implementation of LLVM Streams wasn't removing symbols. This
one should.

llvm-svn: 32845
2007-01-03 22:37:27 +00:00
Evan Cheng
82d9b2077b Fix naming inconsistency: calleesave -> calleesaved.
llvm-svn: 32821
2007-01-02 21:30:17 +00:00
Evan Cheng
3eb79afad9 Add virtual method spillCalleeSaveRegisters() and restoreCalleeSaveRegisters()
to MRegisterInfo. These allow the target to issue instructions to spill and
restore callee saved registers in case where individual stores / loads aren't
the correct / profitable choice.

llvm-svn: 32820
2007-01-02 20:55:17 +00:00
Reid Spencer
2abe7a7078 Add some convenience functions for getting the source and destination
types from any Cast instruction.

llvm-svn: 32807
2007-01-02 02:08:27 +00:00
Reid Spencer
c8ac2ee78c Convert the intrinsic function definitions to use llvm_i32_ty instead of
llvm_uint_ty or llvm_int_ty. Similarly for i8, i16 and i64

llvm-svn: 32802
2006-12-31 22:24:55 +00:00
Reid Spencer
a7eaf62ace For PR950:
Change integer type names for signless integer types

llvm-svn: 32777
2006-12-31 05:23:18 +00:00
Reid Spencer
04efa6fc4b For PR950:
Add a new feature to FunctionType, Parameter Attributes. This allows tags
such as "sext" and "zext" to be associated with a faunction's arguments
or return type. This allows signedness information to be carried forward
from the frontend to the backend for arguments and result types.

llvm-svn: 32776
2006-12-31 05:22:12 +00:00
Reid Spencer
18b28759de For PR950:
Make integer types signless:
  Rename [US]Byte->Int8, [U]Short->Int16, [U]Int->Int32, [U]Long->Int64
  Remove methods pertaining to sign of integer types.

llvm-svn: 32775
2006-12-31 05:20:51 +00:00
Reid Spencer
af792c8e13 Make a variable private now that the conditions requiring it to be
protected have been removed.

llvm-svn: 32766
2006-12-29 04:12:03 +00:00
Reid Spencer
964e311d09 Doxygenify a comment.
llvm-svn: 32765
2006-12-29 04:10:59 +00:00
Reid Spencer
91438b8c2d Add some documentation to make Nick happy.
llvm-svn: 32754
2006-12-23 19:06:54 +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
Devang Patel
b20b78b93e Enable new pass manager. 2nd attempt.
llvm-svn: 32749
2006-12-22 22:55:30 +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
Jim Laskey
0b63729c62 Grandchildren are covered by protect.
llvm-svn: 32736
2006-12-21 21:24:35 +00:00
Jim Laskey
80eeff2d0d Changes from Nick Lewycky with a simplified PPCTargetAsmInfo.
llvm-svn: 32735
2006-12-21 20:26:09 +00:00
Devang Patel
7d20e87bc5 Enable old pass manager. New pass manager causes CBE failures in llvm-test.
llvm-svn: 32719
2006-12-20 19:57:07 +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
John Criswell
3b18f0e184 Added operator methods to the Statistic class; some LLVM projects depend
on these.

llvm-svn: 32701
2006-12-19 22:55:57 +00:00
Devang Patel
83085a18c3 Enable new pass manager.
llvm-svn: 32689
2006-12-19 21:32:24 +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
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
Reid Spencer
2d69d6e962 Correct the description of ConstantInt::isValueValidForType.
llvm-svn: 32664
2006-12-19 01:34:39 +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
6a34f2718f Doxgenate comments.
Add GreatestCommonDivisor64

llvm-svn: 32661
2006-12-19 01:11:32 +00:00
Bill Wendling
899c552208 Removed llvm_ostream and used std::ostream instead.
llvm-svn: 32658
2006-12-18 21:59:00 +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
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
b9db2a065a Determine if the -enable-pic option was given.
llvm-svn: 32649
2006-12-18 04:11:16 +00:00
Rafael Espindola
08c0825f18 move ExtWeakSymbols to AsmPrinter
llvm-svn: 32648
2006-12-18 03:37:18 +00:00
Bill Wendling
8cd0977aad Accidental submission.
llvm-svn: 32639
2006-12-17 11:13:13 +00:00
Reid Spencer
be18cd1575 Fix problems in the CBE and InstructionCombining which use the isMaxValue
and isMinValue methods of ConstantInt. These have been broken since the
isSigned parameter was added. It is necessary to use the signed version
of the type in the call to isValueValidForType or else incorrect results
are returned.

llvm-svn: 32637
2006-12-17 06:07:30 +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
e223919df1 Apply B. Scott Michel's patch for PR1054, thanks!
llvm-svn: 32630
2006-12-16 20:23:42 +00:00
Evan Cheng
70700ba459 Typo.
llvm-svn: 32628
2006-12-16 06:21:55 +00:00
Jeff Cohen
c396e18e8e The best unbreakage yet, addressing Bill's concerns.
llvm-svn: 32622
2006-12-16 02:15:42 +00:00
Jeff Cohen
03161dd132 An even better unbreakage...
llvm-svn: 32617
2006-12-15 22:57:14 +00:00
Jeff Cohen
0c3a14bea7 Complete unbreak of VC++ (Chris identified the simple fix).
llvm-svn: 32615
2006-12-15 22:06:08 +00:00
Evan Cheng
e0aa279fc8 Silly assertion. Forgot variable_ops instructions can have arbitrary number of
operands.

llvm-svn: 32592
2006-12-15 06:37:08 +00:00
Jim Laskey
9c0edd489b File missing from last check in.
llvm-svn: 32586
2006-12-14 21:03:17 +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
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
7684d815d1 Add getTypeToExpandTo() which recursively walks TransformToType to determine
the intrinsic type to expand to.

llvm-svn: 32558
2006-12-13 20:52:00 +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
b5cc5c7d1a Remove DSA.
llvm-svn: 32553
2006-12-13 19:56:15 +00:00
John Criswell
4c4125ce80 Remove DSA header files.
llvm-svn: 32552
2006-12-13 19:55:53 +00:00