summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* [ObjCARC] More debug messages.Michael Gottesman2013-01-131-4/+29
| | | | llvm-svn: 172346
* Fix an editor goof in r171738 that Bill spotted. He may even have a testChandler Carruth2013-01-121-1/+1
| | | | | | | | case, but looking at the diff this was an obviously unintended change. Thanks for the careful review Bill! =] llvm-svn: 172336
* When lowering an inreg sext first shift left, then right arithmetically.Benjamin Kramer2013-01-121-3/+3
| | | | | | | Shifting right two times will only yield zero. Should fix SingleSource/UnitTests/SignlessTypes/factor. llvm-svn: 172322
* MipsDisassembler.cpp: Prune DecodeHWRegs64RegisterClass() to suppress a ↵NAKAMURA Takumi2013-01-121-16/+0
| | | | | | warning. [-Wunused-function] llvm-svn: 172319
* GlobalOpt: Avoid jump on uninitialized value.Benjamin Kramer2013-01-121-1/+1
| | | | | | Found by valgrind. llvm-svn: 172318
* MipsAsmParser: Try to unbreak tests to add extra check.NAKAMURA Takumi2013-01-121-2/+2
| | | | llvm-svn: 172315
* Fixed debug message in ObjCARC.Michael Gottesman2013-01-121-2/+2
| | | | llvm-svn: 172299
* Fixed a few debug messages in ObjCARC and added one.Michael Gottesman2013-01-121-3/+5
| | | | llvm-svn: 172298
* Fixed bug in ObjCARC where we were changing a call from objc_autoreleaseRV ↵Michael Gottesman2013-01-121-3/+6
| | | | | | => objc_autorelease but were not updating the InstructionClass to IC_Autorelease. llvm-svn: 172288
* Fixed a bug where we were tail calling objc_autorelease causing an object to ↵Michael Gottesman2013-01-121-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | not be placed into an autorelease pool. The reason that this occurs is that tail calling objc_autorelease eventually tail calls -[NSObject autorelease] which supports fast autorelease. This can cause us to violate the semantic gaurantees of __autoreleasing variables that assignment to an __autoreleasing variables always yields an object that is placed into the innermost autorelease pool. The fix included in this patch works by: 1. In the peephole optimization function OptimizeIndividualFunctions, always remove tail call from objc_autorelease. 2. Whenever we convert to/from an objc_autorelease, set/unset the tail call keyword as appropriate. *NOTE* I also handled the case where objc_autorelease is converted in OptimizeReturns to an autoreleaseRV which still violates the ARC semantics. I will be removing that in a later patch and I wanted to make sure that the tree is in a consistent state vis-a-vis ARC always. Additionally some test cases are provided and all tests that have tail call marked objc_autorelease keywords have been modified so that tail call has been removed. *NOTE* One test fails due to a separate bug that I am going to commit soon. Thus I marked the check line TMP: instead of CHECK: so make check does not fail. llvm-svn: 172287
* This patch tackles the problem of parsing Mips Jack Carter2013-01-127-237/+496
| | | | | | | | | | | | | | | | | | register names in the standalone assembler llvm-mc. Registers such as $A1 can represent either a 32 or 64 bit register based on the instruction using it. In addition, based on the abi, $T0 can represent different 32 bit registers. The problem is resolved by the Mips specific AsmParser td definitions changing to work together. Many cases of RegisterClass parameters are now RegisterOperand. Contributer: Vladimir Medic llvm-svn: 172284
* Limit the search space in RAGreedy::tryEvict().Jakob Stoklund Olesen2013-01-122-1/+33
| | | | | | | When tryEvict() is looking for a cheaper register in the allocation order, skip the tail of too expensive registers when possible. llvm-svn: 172281
* Precompute some information about register costs.Jakob Stoklund Olesen2013-01-121-2/+22
| | | | | | | | | | | Remember the minimum cost of the registers in an allocation order and the number of registers at the end of the allocation order that have the same cost per use. This information can be used to limit the search space for RAGreedy::tryEvict() when looking for a cheaper register. llvm-svn: 172280
* Stop hiding the interface-exposed EatToEndOfStatement (see r172276).Eli Bendersky2013-01-121-2/+1
| | | | llvm-svn: 172277
* Make ParseIdentifier a public method instead of private.Eli Bendersky2013-01-121-4/+4
| | | | | | | | | | | | | | | | | The MCAsmParser interface defines ParseIdentifier is public. There's no reason whatsoever for AsmParser (which implements the MCAsmParser interface) to hide this method. This is all part of a bigger scheme. Several asm parsing "extensions" use the main parser properly through the MCAsmParser interface. However, GenericAsmParser has much more exclusive access and uses implementation details from the concrete implementation - AsmParser, in which it is also declared as a friend. This makes for overly coupled code, and even makes it hard to split GenericAsmParser into a separate file. There's no reason why GenericAsmParser shouldn't be able to access AsmParser through an abstract interface, as long as it's actually registered as an extension. llvm-svn: 172276
* Fixed whitespace.Michael Gottesman2013-01-111-61/+61
| | | | llvm-svn: 172271
* PPC: Implement efficient lowering of sign_extend_inreg.Nadav Rotem2013-01-111-1/+25
| | | | llvm-svn: 172269
* Proof of concept moving of generic directive parsing from AsmParser to theEli Bendersky2013-01-111-41/+38
| | | | | | | | GenericAsmParser extension, where a lot of directives are already being parsed. The end goal is having just a single place (and a single lookup table) for all directive parsing. llvm-svn: 172268
* Update patch for the pad short functions pass for Intel Atom (only).Preston Gurd2013-01-111-18/+59
| | | | | | | | | Adds a check for -Oz, changes the code to not re-visit BBs, and skips over DBG_VALUE instrs. Patch by Andy Zhang. llvm-svn: 172258
* Remove some accidentaly duplicated code. This needs urgent cleanup :(Benjamin Kramer2013-01-111-270/+0
| | | | llvm-svn: 172248
* Added debug messages to GlobalOpt.Michael Gottesman2013-01-111-17/+110
| | | | | | | | | Specifically: 1. Added a missing new line when we emit a debug message saying that we are marking a global variable as constant. 2. Added debug messages that describe what is occuring when GlobalOpt is evaluating a block/function. 3. Added a debug message that says what specific constructor is being evaluated. llvm-svn: 172247
* Split TargetLowering into a CodeGen and a SelectionDAG part.Benjamin Kramer2013-01-1110-992/+1301
| | | | | | | | | This fixes some of the cycles between libCodeGen and libSelectionDAG. It's still a complete mess but as long as the edges consist of virtual call it doesn't cause breakage. BasicTTI did static calls and thus broke some build configurations. llvm-svn: 172246
* ARM Cost Model: Modify the target independent cost model to askNadav Rotem2013-01-111-12/+21
| | | | | | | | the target if it supports the different CAST types. We didn't do this on X86 because of the different register sizes and types, but on ARM this makes sense. llvm-svn: 172245
* For inline asm:Eric Christopher2013-01-113-4/+18
| | | | | | | | | | | - recognize string "{memory}" in the MI generation - mark as mayload/maystore when there's a memory clobber constraint. PR14859. Patch by Krzysztof Parzyszek llvm-svn: 172228
* Follow-up typo correction from building the wrong branch.Andrew Trick2013-01-111-2/+2
| | | | llvm-svn: 172224
* Fix typo from r170452. Affects -enable-misched heuristics.Andrew Trick2013-01-111-2/+2
| | | | llvm-svn: 172223
* Update CMakeLists for CallPrinter.cpp.Andrew Trick2013-01-111-0/+1
| | | | llvm-svn: 172222
* Added -view-callgraph module pass.Andrew Trick2013-01-112-0/+89
| | | | | | | | -dot-callgraph similarly follows a standard module pass pattern. Patch by Speziale Ettore! llvm-svn: 172220
* Fix bug in exception table allocation (PR13678)Eli Bendersky2013-01-111-8/+18
| | | | | | Patch by Michael Muller. llvm-svn: 172214
* Simplify writing floating types to assembly.Tim Northover2013-01-111-74/+32
| | | | | | | This removes previous special cases for each floating-point type in favour of a shared codepath. llvm-svn: 172189
* ARM Cost Model: We need to detect the max bitwidth of types in the loop in ↵Nadav Rotem2013-01-111-6/+12
| | | | | | | | | | | order to select the max vectorization factor. We don't have a detailed analysis on which values are vectorized and which stay scalars in the vectorized loop so we use another method. We look at reduction variables, loads and stores, which are the only ways to get information in and out of loop iterations. If the data types are extended and truncated then the cost model will catch the cost of the vector zext/sext/trunc operations. llvm-svn: 172178
* Revert r172153, "llvm/lib/MC/MCParser/AsmParser.cpp: [ms-inline-asm] Fix a ↵NAKAMURA Takumi2013-01-111-4/+2
| | | | | | | | couple of undefined behaviors. Operand->needAddressOf() is not initialized at !Operand->isReg()." It has been redundant since r172157. llvm-svn: 172166
* SMDiagnostic: don't emit ranges if there are /any/ multibyte characters.Jordan Rose2013-01-111-9/+12
| | | | | | | | | Right now, only OS X has a way to determine the column width of a string (PR14910). Until we have a good way to deal with this, we just won't print carets, source ranges, or fixits for SMDiagnostic if the source line has multibyte characters in it. llvm-svn: 172164
* Support for half intrinsics. Pushes MMX into slower encoding path.Michael Ilseman2013-01-112-17/+23
| | | | llvm-svn: 172159
* X86AsmParser.cpp: Fix up r172148, to add initializer in another CreateMem().NAKAMURA Takumi2013-01-111-0/+1
| | | | llvm-svn: 172157
* llvm/lib/MC/MCParser/AsmParser.cpp: [ms-inline-asm] Fix a couple of ↵NAKAMURA Takumi2013-01-111-2/+4
| | | | | | undefined behaviors. Operand->needAddressOf() is not initialized at !Operand->isReg(). llvm-svn: 172153
* Remove heavy and unused #inclues from X86TargetObjectFile.cpp.Jakub Staszak2013-01-101-5/+1
| | | | llvm-svn: 172151
* Rename enumerations s/VK/DK/ to conform to naming conventionEli Bendersky2013-01-101-153/+153
| | | | llvm-svn: 172149
* [ms-inline asm] Make sure we set a default value for AddressOf. Follow on toChad Rosier2013-01-101-1/+2
| | | | | | r172121. llvm-svn: 172148
* fix comments a bitEli Bendersky2013-01-101-2/+2
| | | | llvm-svn: 172146
* PR14904: Segmentation fault running pass 'Recognize loop idioms'Shuxin Yang2013-01-101-1/+1
| | | | | | | | The root cause is mistakenly taking for granted that "dyn_cast<Instruction>(a-Value)" return a non-NULL instruction. llvm-svn: 172145
* CastInst::castIsValid should return true if the dest type is the same asEvan Cheng2013-01-101-0/+5
| | | | | | Value's current type. The casting is trivial even for aggregate type. llvm-svn: 172143
* Remove a couple of if-else chains in parsing directives, replacing them by aEli Bendersky2013-01-101-149/+240
| | | | | | switch. Committed with Jim's and Chris's approval. llvm-svn: 172136
* [msan] Change va_start/va_copy shadow memset alignment to 8.Peter Collingbourne2013-01-101-2/+2
| | | | | | | | | This fixes va_start/va_copy of a va_list field which happens to not be laid out at a 16-byte boundary. Differential Revision: http://llvm-reviews.chandlerc.com/D276 llvm-svn: 172128
* PR14896: Handle memcpy from constant string where the memcpy size is larger ↵Evan Cheng2013-01-101-2/+3
| | | | | | than the string size. llvm-svn: 172124
* Remove unneeded includes from FunctionLoweringInfo.h.Jakub Staszak2013-01-101-1/+1
| | | | llvm-svn: 172123
* [ms-inline asm] Add support for calling functions from inline assembly.Chad Rosier2013-01-102-17/+43
| | | | | | Part of rdar://12991541 llvm-svn: 172121
* Teach InstCombine to hoist FABS and FNEG through FPTRUNC instructions. The ↵Owen Anderson2013-01-101-1/+27
| | | | | | application of these operations commutes with the truncation, so we should prefer to do them in the smallest size we can, to save register space, use smaller constant pool entries, etc. llvm-svn: 172117
* Add basic fix-its to SMDiagnostic.Jordan Rose2013-01-101-32/+158
| | | | | | | | | | | | | Like Clang's FixItHint, SMFixIt represents an insertion, replacement, or removal of source text. One or more fix-its can be emitted as part of a diagnostic, and will be printed below the source range line to show the user how they can fix their code. Currently, the only client of SMFixIt is clang-tblgen; thus, the tests for this behavior live in clang/test/TableGen/tg-fixits.td. If/when SMFixIt is adopted within LLVM itself, those tests should be moved to the LLVM suite. llvm-svn: 172086
* TableGen: Keep track of superclass reference ranges.Jordan Rose2013-01-102-34/+46
| | | | | | | | | | def foo : bar; ~~~ This allows us to produce more precise diagnostics about a certain superclass, and even provide fixits. llvm-svn: 172085
OpenPOWER on IntegriCloud