summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Allow the use of an alternate symbol for calculating a function's size.Hal Finkel2012-02-222-2/+9
| | | | | | | | | | | | | The standard function epilog includes a .size directive, but ppc64 uses an alternate local symbol to tag the actual start of each function. Until recently, binutils accepted the .size directive as: .size test1, .Ltmp0-test1 however, using this directive with recent binutils will result in the error: .size expression for XXX does not evaluate to a constant so we must use the label which actually tags the start of the function. llvm-svn: 151200
* Properly emit _fltused with FastISel. Refactor to share code with SDAG.Michael J. Spencer2012-02-225-18/+31
| | | | | | Patch by Joe Groff! llvm-svn: 151183
* Comment from code reviewAndrew Trick2012-02-221-0/+1
| | | | llvm-svn: 151178
* Remove extra semi-colons.Chad Rosier2012-02-227-9/+9
| | | | llvm-svn: 151169
* 80 col.Jakob Stoklund Olesen2012-02-221-3/+5
| | | | llvm-svn: 151167
* Efficient pattern for store truncate. Patch by Evandro Menezes.Sirish Pande2012-02-224-22/+7
| | | | llvm-svn: 151166
* Add Foreach LoopDavid Greene2012-02-224-5/+262
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add some data structures to represent for loops. These will be referenced during object processing to do any needed iteration and instantiation. Add foreach keyword support to the lexer. Add a mode to indicate that we're parsing a foreach loop. This allows the value parser to early-out when processing the foreach value list. Add a routine to parse foreach iteration declarations. This is separate from ParseDeclaration because the type of the named value (the iterator) doesn't match the type of the initializer value (the value list). It also needs to add two values to the foreach record: the iterator and the value list. Add parsing support for foreach. Add the code to process foreach loops and create defs based on iterator values. Allow foreach loops to be matched at the top level. When parsing an IDValue check if it is a foreach loop iterator for one of the active loops. If so, return a VarInit for it. Add Emacs keyword support for foreach. Add VIM keyword support for foreach. Add tests to check foreach operation. Add TableGen documentation for foreach. Support foreach with multiple objects. Support non-braced foreach body with one object. Do not require types for the foreach declaration. Assume the iterator type from the iteration list element type. llvm-svn: 151164
* Remove static ctor.Benjamin Kramer2012-02-221-2/+2
| | | | llvm-svn: 151160
* Support was removed from LLVM's MIPS backend for the PSP variant of thatChandler Carruth2012-02-221-3/+1
| | | | | | | | | | | | | chip in r139383, and the PSP components of the triple are really annoying to parse. Let's leave this chapter behind. There is no reason to expect LLVM to see a PSP-related triple these days, and so no reasonable motivation to support them. It might be reasonable to prune a few of the older MIPS triple forms in general, but as those at least cause no burden on parsing (they aren't both a chip and an OS!), I'm happy to leave them in for now. llvm-svn: 151156
* Only add DW_AT_prototyped if we're working with a C-like language.Eric Christopher2012-02-221-3/+12
| | | | | | | | Worth another 45k (1%) off of a large C++ testcase. rdar://10909458 llvm-svn: 151144
* Add the source language into the compile unit.Eric Christopher2012-02-223-4/+10
| | | | llvm-svn: 151143
* Remove extra semi-colon.Eric Christopher2012-02-221-1/+1
| | | | llvm-svn: 151142
* Declare register classes as const. Fix a couple pointers to register classes ↵Craig Topper2012-02-221-2/+2
| | | | | | that weren't already const. llvm-svn: 151138
* misched: DAG builder should not track dependencies for SSA defs.Andrew Trick2012-02-221-1/+5
| | | | | | | The vast majority of virtual register definitions don't need an entry in the DAG builder's VRegDefs set. llvm-svn: 151136
* Initialize SUnits before DAG building.Andrew Trick2012-02-225-75/+113
| | | | | | | | | | | | Affect on SD scheduling and postRA scheduling: Printing the DAG will display the nodes in top-down topological order. This matches the order within the MBB and makes my life much easier in general. Affect on misched: We don't need to track virtual register uses at all. This is awesome. I also intend to rely on the SUnit ID as a topo-sort index. So if A < B then we cannot have an edge B -> A. llvm-svn: 151135
* Make all pointers to TargetRegisterClass const since they are all pointers ↵Craig Topper2012-02-2214-51/+44
| | | | | | to static data that should not be modified. llvm-svn: 151134
* Improve comment. Thanks for Andrew for the suggestion.Rafael Espindola2012-02-221-2/+3
| | | | llvm-svn: 151127
* Semantically revert 151015. Add a comment on why we should be able to assertRafael Espindola2012-02-221-7/+17
| | | | | | | | the dominance once the dominates method is fixed and why we can use the builder's insertion point. Fixes pr12048. llvm-svn: 151125
* Adding support for Microsoft's thiscall calling convention. LLVM side of ↵Aaron Ballman2012-02-221-2/+2
| | | | | | the patch. llvm-svn: 151123
* Clarify ARM calling conventions.Jakob Stoklund Olesen2012-02-221-0/+2
| | | | llvm-svn: 151113
* Use SparseSet for the RAFast live virtual register map.Jakob Stoklund Olesen2012-02-221-73/+110
| | | | | | | | | | | | This makes RAFast 4% faster, and it gets rid of the dodgy DenseMap iteration. This also revealed that RAFast would sometimes dereference DenseMap iterators after erasing other elements from the map. That does seem to work in the current DenseMap implementation, but SparseSet doesn't allow it. llvm-svn: 151111
* Use a function in MathExtras to do sign extension.Akira Hatanaka2012-02-221-1/+1
| | | | llvm-svn: 151107
* Calls don't really change the stack pointer.Jakob Stoklund Olesen2012-02-211-1/+2
| | | | | | | Even if a call instruction has %SP<imp-def> operands, it doesn't change the value of the stack pointer. llvm-svn: 151104
* Add API "handleMoveIntoBundl" for updating liveness when moving instructions ↵Lang Hames2012-02-211-13/+68
| | | | | | | | | | | | into bundles. This method takes a bundle start and an MI being bundled, and makes the intervals for the MI's operands appear to start/end on the bundle start. Also fixes some minor cosmetic issues (whitespace, naming convention) in the HMEditor code. llvm-svn: 151099
* There's no need for a DW_AT_byte_size on a pointer type.Eric Christopher2012-02-211-1/+1
| | | | | | Part of rdar://10493979 where it reduces by about .5% (10k) llvm-svn: 151097
* Use the target-aware constant folder on expressions to improve the chanceNick Lewycky2012-02-211-2/+9
| | | | | | | | | | | | | they'll be simple enough to simulate, and to reduce the chance we'll encounter equal but different simple pointer constants. This removes the symptoms from PR11352 but is not a full fix. A proper fix would either require a guarantee that two constant objects we simulate are folded when equal, or a different way of handling equal pointers (ie., trying a constantexpr icmp on them to see whether we know they're equal or non-equal or unsure). llvm-svn: 151093
* Proper support for a bastardized darwin-eabi hybird ABI.Evan Cheng2012-02-214-8/+7
| | | | llvm-svn: 151083
* s/the the/the/Rafael Espindola2012-02-211-1/+1
| | | | llvm-svn: 151079
* Fix unsigned off-by-one in comment.Benjamin Kramer2012-02-211-1/+1
| | | | llvm-svn: 151056
* InstCombine: Don't transform a signed icmp of two GEPs into a signed compare ↵Benjamin Kramer2012-02-211-0/+8
| | | | | | | | | | | of the indices. This transformation is not safe in some pathological cases (signed icmp of pointers should be an extremely rare thing, but it's valid IR!). Add an explanatory comment. Kudos to Duncan for pointing out this edge case (and not giving up explaining it until I finally got it). llvm-svn: 151055
* Move the implementation of StringRef::split out of StringExtras.cppDuncan Sands2012-02-212-21/+21
| | | | | | and into StringRef.cpp, which is where the other StringRef stuff is. llvm-svn: 151054
* Revert r151049 cos it broke the buildbots.Jay Foad2012-02-212-131/+34
| | | | llvm-svn: 151052
* Tiny cosmetic change to use the same style for all of the while loops inChandler Carruth2012-02-211-2/+4
| | | | | | the normalize routine, especially the empty while loops. llvm-svn: 151050
* PR1210: make uniquing of struct and function types more efficient byJay Foad2012-02-212-34/+131
| | | | | | | | | using a DenseMap and Talin's new GeneralHash, avoiding the need for a temporary std::vector on every lookup. Patch by Meador Inge! llvm-svn: 151049
* Replace a hand rolled loop with a lovely StringRef helper we have theseChandler Carruth2012-02-211-4/+1
| | | | | | days. No functionality changed. llvm-svn: 151048
* Pull the parsing helper functions out of the Triple interface entirely.Chandler Carruth2012-02-211-89/+90
| | | | | | | | | | | | | They're private static methods but we can just make them static functions in the implementation. It makes the implementations a touch more wordy, but takes another chunk out of the header file. Also, take the opportunity to switch the names to the new coding conventions. No functionality changed here. llvm-svn: 151047
* Clean up comments that I missed when changing the triple representation.Chandler Carruth2012-02-211-10/+7
| | | | | | | | Somehow, I even missed the ones I wrote just the other day... Thanks to Matt for the code review. llvm-svn: 151045
* Clear virtual registers after they are no longer referenced.Andrew Trick2012-02-218-6/+42
| | | | | | | | | | | | | Passes after RegAlloc should be able to rely on MRI->getNumVirtRegs() == 0. This makes sharing code for pre/postRA passes more robust. Now, to check if a pass is running before the RA pipeline begins, use MRI->isSSA(). To check if a pass is running after the RA pipeline ends, use !MRI->getNumVirtRegs(). PEI resets virtual regs when it's done scavenging. PTX will either have to provide its own PEI pass or assign physregs. llvm-svn: 151032
* StackSlotColoring does not use a VirtRegMapAndrew Trick2012-02-211-4/+0
| | | | llvm-svn: 151031
* Use more idiomatic assert.Rafael Espindola2012-02-211-2/+2
| | | | llvm-svn: 151026
* Avoid warning on non assert builds.Rafael Espindola2012-02-211-2/+3
| | | | llvm-svn: 151025
* Switch the llvm::Triple class to immediately parse the triple string onChandler Carruth2012-02-212-24/+17
| | | | | | | | | construction. Simplify its interface, implementation, and users accordingly as there is no longer an 'uninitialized' state to check for. Also, fixes a bug lurking in the interface as there was one method that didn't correctly check for initialization. llvm-svn: 151024
* It turns out that with the current scev organization ReuseOrCreateCast cannotRafael Espindola2012-02-211-9/+9
| | | | | | | | | | | | | | know where users will be added. Because of this, it cannot use Builder.GetInsertPoint at all. This patch * removes the FIXME about adding the assert. * adds a comment explaining hy we don't have one. * removes a broken logic that only works for some callers and is not needed since r150884. * adds an assert to caller that would have caught the bug fixed by r150884. llvm-svn: 151015
* Fix some bugs in HMEditor's moveAllOperandsInto logic.Lang Hames2012-02-211-9/+10
| | | | llvm-svn: 151006
* Check for the correct size in the invariant marker.Nick Lewycky2012-02-201-4/+7
| | | | llvm-svn: 151003
* Fix machine-cp by having it to check sub-register indicies. e.g.Evan Cheng2012-02-202-3/+27
| | | | | | | | | | | | ecx = mov eax al = mov ch The second copy is not a nop because the sub-indices of ecx,ch is not the same of that of eax/al. Re-enabled machine-cp. PR11940 llvm-svn: 151002
* Fix 80-column violation.Chad Rosier2012-02-201-1/+2
| | | | llvm-svn: 150998
* InstCombine: Removing the base from the address calculation is only safe ↵Benjamin Kramer2012-02-201-1/+1
| | | | | | when the GEPs are inbounds. llvm-svn: 150978
* Make this a bit prettier and more obvious when a derived type isn'tEric Christopher2012-02-201-1/+3
| | | | | | derived from anything. llvm-svn: 150975
* If a derived type is also a composite type, print that informationEric Christopher2012-02-201-2/+7
| | | | | | too. llvm-svn: 150974
OpenPOWER on IntegriCloud