aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo in comment.Nick Lewycky2013-01-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172460 91177308-0d34-0410-b5e6-96231b3b80d8
* Changed SmallPtrSet.count guard + SmallPtrSet.insert to just SmallPtrSet.insert.Michael Gottesman2013-01-141-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172452 91177308-0d34-0410-b5e6-96231b3b80d8
* Move CheckForValidSection to the MCAsmParser interface.Eli Bendersky2013-01-141-1/+1
| | | | | | | | | | | | | | Now that it behaves itself in terms of streamer independence (r172450), this method can be moved to MCAsmParser to be available to all extensions, overriding, etc. -- -This line, and those below, will be ignored-- M lib/MC/MCParser/AsmParser.cpp M include/llvm/MC/MCParser/MCAsmParser.h git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172451 91177308-0d34-0410-b5e6-96231b3b80d8
* Expose an InitToTextSection through MCStreamer.Eli Bendersky2013-01-147-11/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The aim of this patch is to fix the following piece of code in the platform-independent AsmParser: void AsmParser::CheckForValidSection() { if (!ParsingInlineAsm && !getStreamer().getCurrentSection()) { TokError("expected section directive before assembly directive"); Out.SwitchSection(Ctx.getMachOSection( "__TEXT", "__text", MCSectionMachO::S_ATTR_PURE_INSTRUCTIONS, 0, SectionKind::getText())); } } This was added for the "-n" option of llvm-mc. The proposed fix adds another virtual method to MCStreamer, called InitToTextSection. Conceptually, it's similar to the existing InitSections which initializes all common sections and switches to text. The new method is implemented by each platform streamer in a way that it sees fit. So AsmParser can now do this: void AsmParser::CheckForValidSection() { if (!ParsingInlineAsm && !getStreamer().getCurrentSection()) { TokError("expected section directive before assembly directive"); Out.InitToTextSection(); } } Which is much more reasonable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172450 91177308-0d34-0410-b5e6-96231b3b80d8
* Move ParseMacroArgument to the MCAsmParser interfance.Eli Bendersky2013-01-141-12/+8
| | | | | | | | | | | | | | Since it's used by extensions. One further step to fully decoupling GenericAsmParser from an intimate knowledge of the internals of AsmParser, pointing it to the MCASmParser interface instead (like all other parser extensions do). Since this change moves the MacroArgument type to the interface header, it's renamed to be a bit more descriptive in a general context. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172449 91177308-0d34-0410-b5e6-96231b3b80d8
* Encapsulate the MacroEnabled flag in AsmParser behind accessor methods.Eli Bendersky2013-01-141-4/+7
| | | | | | | | | | The methods are also exposed via the MCAsmParser interface, which allows more than one client to control them. Previously, GenericAsmParser was playing with a member var in AsmParser directly (by virtue of being its friend). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172440 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r171829 "Split changeset_ty using iterators instead of loops" as it ↵Timur Iskhodzhanov2013-01-141-8/+6
| | | | | | breaks the VS2008 build git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172411 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify nested strconcats in X86 td files since strconcat can take more ↵Craig Topper2013-01-142-32/+32
| | | | | | than 2 arguments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172379 91177308-0d34-0410-b5e6-96231b3b80d8
* Create a single multiclass for SSE and AVX version of MOVL/MOVH. Prevents ↵Craig Topper2013-01-141-23/+24
| | | | | | needing to specify everything twice. No functional change intended git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172378 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed some 80+ violations.Michael Gottesman2013-01-141-14/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172374 91177308-0d34-0410-b5e6-96231b3b80d8
* Updated the documentation in ObjCARC.cpp to fit the style guide better (i.e. ↵Michael Gottesman2013-01-141-232/+259
| | | | | | use doxygen). Still some work to do though. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172371 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed an infinite loop in the block escape in analysis in ObjCARC caused by ↵Michael Gottesman2013-01-131-3/+14
| | | | | | | | 2x blocks each assigned a value via a phi-node causing each to depend on the other. A test case is provided as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172368 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo in comment.Nick Lewycky2013-01-131-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172364 91177308-0d34-0410-b5e6-96231b3b80d8
* fix compile-time regression report by Joerg Sonnenberger:Nuno Lopes2013-01-131-9/+11
| | | | | | cache result of Size/OffsetVisitor to speedup analysis of PHI nodes git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172363 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove redundant 'llvm::' qualificationsDmitri Gribenko2013-01-139-23/+23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172358 91177308-0d34-0410-b5e6-96231b3b80d8
* X86: Add patterns for X86ISD::VSEXT in registers.Benjamin Kramer2013-01-131-0/+42
| | | | | | | Those can occur when something between the sextload and the store is on the same chain and blocks isel. Fixes PR14887. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172353 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR14547. Handle induction variables of small sizes smaller than i32 (i8 ↵Nadav Rotem2013-01-131-0/+3
| | | | | | and i16). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172348 91177308-0d34-0410-b5e6-96231b3b80d8
* [ObjCARC] Even more debug messages!Michael Gottesman2013-01-131-1/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172347 91177308-0d34-0410-b5e6-96231b3b80d8
* [ObjCARC] More debug messages.Michael Gottesman2013-01-131-4/+29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172346 91177308-0d34-0410-b5e6-96231b3b80d8
* 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! =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172336 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172322 91177308-0d34-0410-b5e6-96231b3b80d8
* MipsDisassembler.cpp: Prune DecodeHWRegs64RegisterClass() to suppress a ↵NAKAMURA Takumi2013-01-121-16/+0
| | | | | | warning. [-Wunused-function] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172319 91177308-0d34-0410-b5e6-96231b3b80d8
* GlobalOpt: Avoid jump on uninitialized value.Benjamin Kramer2013-01-121-1/+1
| | | | | | Found by valgrind. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172318 91177308-0d34-0410-b5e6-96231b3b80d8
* MipsAsmParser: Try to unbreak tests to add extra check.NAKAMURA Takumi2013-01-121-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172315 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed debug message in ObjCARC.Michael Gottesman2013-01-121-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172299 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed a few debug messages in ObjCARC and added one.Michael Gottesman2013-01-121-3/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172298 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172288 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172287 91177308-0d34-0410-b5e6-96231b3b80d8
* 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172284 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172281 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172280 91177308-0d34-0410-b5e6-96231b3b80d8
* Stop hiding the interface-exposed EatToEndOfStatement (see r172276).Eli Bendersky2013-01-121-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172277 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172276 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed whitespace.Michael Gottesman2013-01-111-61/+61
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172271 91177308-0d34-0410-b5e6-96231b3b80d8
* PPC: Implement efficient lowering of sign_extend_inreg.Nadav Rotem2013-01-111-1/+25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172269 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172268 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172258 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some accidentaly duplicated code. This needs urgent cleanup :(Benjamin Kramer2013-01-111-270/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172248 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172247 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172246 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172245 91177308-0d34-0410-b5e6-96231b3b80d8
* 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172228 91177308-0d34-0410-b5e6-96231b3b80d8
* Follow-up typo correction from building the wrong branch.Andrew Trick2013-01-111-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172224 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo from r170452. Affects -enable-misched heuristics.Andrew Trick2013-01-111-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172223 91177308-0d34-0410-b5e6-96231b3b80d8
* Update CMakeLists for CallPrinter.cpp.Andrew Trick2013-01-111-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172222 91177308-0d34-0410-b5e6-96231b3b80d8
* Added -view-callgraph module pass.Andrew Trick2013-01-112-0/+89
| | | | | | | | -dot-callgraph similarly follows a standard module pass pattern. Patch by Speziale Ettore! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172220 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug in exception table allocation (PR13678)Eli Bendersky2013-01-111-8/+18
| | | | | | | | Patch by Michael Muller. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172214 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172189 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172178 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172166 91177308-0d34-0410-b5e6-96231b3b80d8