summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Specify the value type for the register, not just the size.Chris Lattner2003-07-281-1/+4
| | | | llvm-svn: 7357
* Instead of specifying the SIZE of the register, go so far as to specifyChris Lattner2003-07-281-1/+16
| | | | | | what value type it is. llvm-svn: 7356
* Rename function to be more consistent with filenameChris Lattner2003-07-263-6/+6
| | | | llvm-svn: 7352
* Making this code const-correct would be a pain, so I'll hack it.Chris Lattner2003-07-262-5/+6
| | | | llvm-svn: 7350
* Const correctness fixesChris Lattner2003-07-262-3/+3
| | | | llvm-svn: 7349
* Be const correctChris Lattner2003-07-261-2/+2
| | | | llvm-svn: 7348
* Hrm, another necesary one :(Chris Lattner2003-07-261-0/+1
| | | | llvm-svn: 7347
* We don't modify the LLVM rep, remain const correctChris Lattner2003-07-261-2/+2
| | | | llvm-svn: 7345
* If the pass changes _anything_ it must return trueChris Lattner2003-07-261-1/+2
| | | | llvm-svn: 7344
* This code doesn't modify the LLVM structure, keep stuff constChris Lattner2003-07-263-6/+6
| | | | llvm-svn: 7343
* Remove #includeChris Lattner2003-07-261-1/+0
| | | | llvm-svn: 7342
* Remove extraneous #includesChris Lattner2003-07-262-2/+1
| | | | llvm-svn: 7341
* Fix another minor bugChris Lattner2003-07-261-2/+2
| | | | llvm-svn: 7340
* (1) Major fix to the way unused regs. are marked and found for the FPVikram S. Adve2003-07-254-566/+140
| | | | | | | | | | | | | Single and FP double reg types (which share the same reg class). Now all methods marking/finding unused regs consider the regType within the reg class, and SparcFloatRegClass specializes this code. (2) Remove machine-specific regalloc. methods that are no longer needed. In particular, arguments and return value from a call do not need machine-specific code for allocation. (3) Rename TargetRegInfo::getRegType variants to avoid unintentional overloading when an include file is omitted. llvm-svn: 7334
* 1. Fix a case that was marking the invalid reg. num. (-1) as used,Vikram S. Adve2003-07-251-14/+35
| | | | | | | | causing a nasty array bound error later. 2. Fix silly typo causing logical shift of unsigned long to use SRL instead of SRLX. llvm-svn: 7330
* (1) Change the way unused regs. are marked and found to consider regTypeVikram S. Adve2003-07-254-116/+134
| | | | | | | | | | | info (since multiple reg types may share the same reg class). (2) Remove machine-specific regalloc. methods that are no longer needed. In particular, arguments and return value from a call do not need machine-specific code for allocation. (3) Rename TargetRegInfo::getRegType variants to avoid unintentional overloading when an include file is omitted. llvm-svn: 7329
* Remove unused field. Change the way unused regs. are marked andVikram S. Adve2003-07-251-10/+11
| | | | | | | found to consider regType info (since multiple reg types may share the same reg class, e.g., single and double on Sparc). llvm-svn: 7327
* Dont' try to parse the colonChris Lattner2003-07-251-2/+2
| | | | llvm-svn: 7323
* Add a more general check-flags which can be used to ensure arbitrary flags ↵Chris Lattner2003-07-251-11/+35
| | | | | | are set llvm-svn: 7322
* Include llvm/Support/Mangler.h first. Don't include <iostream>, <set>,Brian Gaeke2003-07-251-5/+1
| | | | | | <string>, or llvm/Value.h. Move up the inclusion of llvm/Support/Mangler.h. llvm-svn: 7321
* Don't include llvm/SlotCalculator.h, or <set>.Brian Gaeke2003-07-251-3/+1
| | | | | | Move up the inclusion of llvm/Support/Mangler.h. llvm-svn: 7320
* Cleanups:Brian Gaeke2003-07-241-4/+5
| | | | | | | | | Mangler.cpp: Constify parameter to makeNameProper, and use const_iterator. Make Count an unsigned int, and use utostr(). Don't name parameters things that start with underscore. Mangler.h: All of the above, and also: Add Emacs mode-line. Include <set>. llvm-svn: 7301
* Factor out name-mangling from X86/Printer, which is derived from CWriter,Brian Gaeke2003-07-241-0/+83
| | | | | | into this new support class. llvm-svn: 7300
* Use unified CWriter-X86/Printer name mangler. Do not bother usingBrian Gaeke2003-07-242-159/+49
| | | | | | | SlotCalculator in CWriter. (Unfortunately, all this means a lot of X86/Printer's methods have to be de-constified again. Oh well.) llvm-svn: 7299
* Instcombine: (A >> c1) << c2 for signed integersChris Lattner2003-07-241-10/+12
| | | | llvm-svn: 7295
* Reorganization of code, no functional changes.Chris Lattner2003-07-241-47/+48
| | | | | | Now it shoudl be a bit more efficient llvm-svn: 7292
* It doesn't appear that we need to #include these.Brian Gaeke2003-07-241-3/+0
| | | | llvm-svn: 7291
* Allow folding several instructions into casts, which can simplify a lotChris Lattner2003-07-241-7/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of codes. For example, short kernel (short t1) { t1 >>= 8; t1 <<= 8; return t1; } became: short %kernel(short %t1.1) { %tmp.3 = shr short %t1.1, ubyte 8 ; <short> [#uses=1] %tmp.5 = cast short %tmp.3 to int ; <int> [#uses=1] %tmp.7 = shl int %tmp.5, ubyte 8 ; <int> [#uses=1] %tmp.8 = cast int %tmp.7 to short ; <short> [#uses=1] ret short %tmp.8 } before, now it becomes: short %kernel(short %t1.1) { %tmp.3 = shr short %t1.1, ubyte 8 ; <short> [#uses=1] %tmp.8 = shl short %tmp.3, ubyte 8 ; <short> [#uses=1] ret short %tmp.8 } which will become: short %kernel(short %t1.1) { %tmp.3 = and short %t1.1, 0xFF00 ret short %tmp.3 } This implements cast-set.ll:test4 and test5 llvm-svn: 7290
* Minor cleanupsChris Lattner2003-07-241-3/+3
| | | | llvm-svn: 7289
* Constify most methods. We could have constified doInitialization andBrian Gaeke2003-07-241-16/+25
| | | | | | | | | | | doFinalization too except that would have made them shadow, not override, the parent class :-P. Allow *any* constant cast expression between pointers and longs, or vice-versa, or any widening (not just same-size) conversion that isLosslesslyConvertibleTo approves. This fixes oopack. llvm-svn: 7288
* Fix bug: FunctionResolve/2003-07-23-CPR-Reference.llChris Lattner2003-07-231-6/+8
| | | | | | | This fixes a long time annoyance which caused prototypes for bzero, bcopy, bcmp, fputs, and fputs_unlocked to never get deleted. Grr. llvm-svn: 7285
* Add commentsChris Lattner2003-07-231-0/+9
| | | | llvm-svn: 7283
* Remove explicit check for: not (not X) = X, it is already handled because ↵Chris Lattner2003-07-231-10/+16
| | | | | | | | | xor is commutative - InstCombine: (X & C1) ^ C2 --> (X & C1) | C2 iff (C1&C2) == 0 - InstCombine: (X | C1) ^ C2 --> (X | C1) & ~C2 iff (C1&C2) == C2 llvm-svn: 7282
* Fix program: SingleSource/UnitTests/2003-07-09-SignedArgs with the CBEChris Lattner2003-07-231-1/+2
| | | | llvm-svn: 7276
* Printer.cpp: Ditch addRequired/getAnalysis, because they leaveBrian Gaeke2003-07-233-61/+58
| | | | | | | | | | | Printer::doFinalization() out in the cold. Now we pass in a TargetMachine to Printer's constructor and get the TargetData from the TargetMachine. Don't pass TargetMachine or MRegisterInfo objects around in the Printer. Constify TargetData references. X86.h: Update comment and prototype of createX86CodePrinterPass(). X86TargetMachine.cpp: Update callers of createX86CodePrinterPass(). llvm-svn: 7275
* Make Module::getNamedFunction prefer non-external functions if there is more ↵Chris Lattner2003-07-231-2/+6
| | | | | | | | than one function of the same name llvm-svn: 7274
* Fix spaceChris Lattner2003-07-231-1/+1
| | | | llvm-svn: 7273
* InstCombine: (X ^ C1) & C2 --> (X & C2) iff (C1&C2) == 0Chris Lattner2003-07-231-9/+11
| | | | llvm-svn: 7272
* - InstCombine: (X | C1) & C2 --> X & C2 iff C1 & C1 == 0Chris Lattner2003-07-231-10/+33
| | | | | | | - InstCombine: (X | C) & C --> C - InstCombine: (X | C1) & C2 --> (X | (C1&C2)) & C2 llvm-svn: 7269
* Add, rewrite, and/or reformat many comments.Brian Gaeke2003-07-231-80/+120
| | | | | | | | | | | | | | | | | | | | Stop passing ostreams around: we already have one perfectly good ostream and we can all share it. Stop stashing a pointer to TargetData in the Pass object, because that will lead to a crash if there are no functions in the module (ouch!) Instead, use addRequired() and getAnalysis(), like we always should have done. Move the check for ConstantExpr up before the check for isPrimitiveType, because we need to be able to catch e.g. ubyte (cast bool false to ubyte), whose type is primitive but which is nevertheless a ConstantExpr, by calling our specialized handler instead of the AsmWriter. This would result in assembler errors when we would try to output something like ".byte (cast bool false to ubyte)". GC some unused variable declarations. llvm-svn: 7265
* IC: (X & C1) | C2 --> (X | C2) & (C1|C2)Chris Lattner2003-07-231-1/+26
| | | | | | | | | IC: (X ^ C1) | C2 --> (X | C2) ^ (C1&~C2) We are now guaranteed that all 'or's will be inside of 'and's, and all 'and's will be inside of 'xor's, if the second operands are constants. llvm-svn: 7264
* IC: (X ^ C1) & C2 --> (X & C2) ^ (C1&C2)Chris Lattner2003-07-231-4/+16
| | | | | | Minor code cleanup llvm-svn: 7262
* InstCombine: (X ^ 4) == 8 --> X == 12Chris Lattner2003-07-231-1/+6
| | | | llvm-svn: 7260
* IC: (X & 5) == 13 --> falseChris Lattner2003-07-231-5/+25
| | | | | | IC: (X | 8) == 4 --> false llvm-svn: 7257
* Remove redundant const qualifierChris Lattner2003-07-231-3/+3
| | | | llvm-svn: 7254
* Remove redundant const qualifiers from cast<> expressionsChris Lattner2003-07-238-45/+45
| | | | llvm-svn: 7253
* Simplify code by using ConstantInt::getRawValue instead of checking to seeChris Lattner2003-07-2311-80/+29
| | | | | | whether the constant is signed or unsigned, then casting llvm-svn: 7252
* Remove unnecessary castsChris Lattner2003-07-231-2/+2
| | | | llvm-svn: 7250
* Fit code into 80 columnsChris Lattner2003-07-231-2/+4
| | | | llvm-svn: 7249
* Eliminate old-style castChris Lattner2003-07-231-1/+1
| | | | llvm-svn: 7248
OpenPOWER on IntegriCloud