aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore
AgeCommit message (Collapse)Author
2007-01-12Implement review feedback for the ConstantBool->ConstantInt merge. ChrisReid Spencer
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-11Start using PMStack. Now each pass is responsibe for assingingDevang Patel
a pass manager for itself. There is some opportunity to remove some dead code from PassManager.cpp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33087 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11Use getPassManagerType() instead of dynamic_cast.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33078 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11Rename BoolTy as Int1Ty. Patch by Sheng Zhou.Reid Spencer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33076 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11For PR1043:Zhou Sheng
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-11Shut up a warning about signed/unsigned.Reid Spencer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33071 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11simplify some logic furtherChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33069 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11Recommit my previous patch with a bugfix: printInfoComment works on bothChris Lattner
local and global values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33068 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11Add PassManagerType enum.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33065 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11Implement better constant folding of unordered FCMP predicates.Reid Spencer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33063 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11Robustify assingPassManager() for Module, Function and Basic BlockDevang Patel
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-10Back out the last patch which is a nightly test killer. The assertionReid Spencer
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-10Last refactoring before PR645: split up getSlot into getLocalSlot and ↵Chris Lattner
getGlobalSlot. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33053 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-10eliminate some iterator gymnastics.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33052 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-09Inline insertValue into CreateModuleSlot/CreateFunctionSlotChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33038 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-09Remove a bunch of complex logic that is completely dead: duplicates canChris Lattner
never be inserted! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33037 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-09Split CreateSlot into two versions, one for globals and one for function-localChris Lattner
values git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33036 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-09Remove extraneous return value from insertValue and getOrCreateSlot. SinceChris Lattner
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-08Parameter attributes are part of a FunctionType and deserve to be factoredReid Spencer
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-08Add PMStack, a Pass Manager stack.Devang Patel
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-08And asm writing for packed struct initializersAndrew Lenharth
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33016 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07Change the interface to Module::getOrInsertFunction to be easier to use,Chris Lattner
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-06For PR411:Reid Spencer
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32956 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-051) Remove old AnalysisResolver.Devang Patel
2) Rename AnalysisResolver_New as AnalysisResolver git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32938 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05Remove PassManagerT.hDevang Patel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32928 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05Remove old pass manager.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32927 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05Change the syntax for parameter attributes:Reid Spencer
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32904 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-04Do not allow packed types for icmp and fcmp instructions.Reid Spencer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32865 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-04Now that setcondinst has been eliminated, we can mark Value::SubclassIDChris Lattner
const and remove the ugly mutator methods. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32860 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-04fix typoChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32859 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-04fix some bugs handling vectors, avoid host-specific handling of undefined ↵Chris Lattner
shift results. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32857 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-04Add a new ConstantPacked::getAllOnesValue methodChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32856 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31Fix a cut-and-paste bug for processing of InvokeInst parameter attributes.Reid Spencer
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-31Fix a bug in comparison of GEP indices.Reid Spencer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32798 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31Fix a bug in getParamAttrs where an invalid value would be returned if theReid Spencer
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-31For PR950:Reid Spencer
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-31For PR950:Reid Spencer
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-31For PR950:Reid Spencer
* 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-29For PR950:Reid Spencer
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-24Cleanup ConstantFoldCompareInstruction:Reid Spencer
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-24Fix some comments.Reid Spencer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32758 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-23Don't overload var names.Reid Spencer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32752 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-23For PR950:Reid Spencer
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-22ModulePass and ImmutablePass. Force out of line virtual method.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32748 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-21At the beginning of run, initialize analyis info availability for _ALL_Devang Patel
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-20Fix Regression/Verifier/invoke-1.llChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32722 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-20Revert the previous patch which was incorrect. This unbreaks eon, but rebreaksChris Lattner
invoke-1.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32718 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19Now that ConstantInt::isValueValidForType can handle signed and unsignedReid Spencer
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-19Now, there is additional layer, referred in the comment,Devang Patel
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-19s/BasicBlockPassManager/BBPassManager/gDevang Patel
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