summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* DebugInfo: Rename generic unit references to "TheU" instead of TheCU now ↵David Blaikie2013-12-023-65/+65
| | | | | | | | that they might be type units instead of compile units. CR feedback from Eric Christopher on r196139. llvm-svn: 196159
* DebugInfo: Rename DwarfCompileUnit.* to DwarfUnit.* to match their contents.David Blaikie2013-12-025-4/+4
| | | | llvm-svn: 196140
* DebugInfo: Refactor CompileUnit into a Unit baseclass and ↵David Blaikie2013-12-024-181/+183
| | | | | | | | | | CompileUnit/TypeUnit derived classes. Header/cpp file rename to follow immediately - just splitting out the commits for ease of review/reading to demonstrate that the renaming changes are entirely mechanical. llvm-svn: 196139
* DebugInfo: Type Units: Propagate the correct DW_AT_language into type units.David Blaikie2013-12-023-7/+7
| | | | llvm-svn: 196130
* Move getSymbolWithGlobalValueBase to TargetLoweringObjectFile.Rafael Espindola2013-12-022-17/+5
| | | | | | This allows it to be used in TargetLoweringObjectFileImpl.cpp. llvm-svn: 196117
* Reverse the order of eviction checks for possible compile time savings. No ↵Andrew Trick2013-11-291-3/+3
| | | | | | functionality. llvm-svn: 195969
* Teach LocalStackSlotAllocation that stackmaps/patchpoints don't have rangeLang Hames2013-11-291-3/+5
| | | | | | constraints on their frame offsets. llvm-svn: 195950
* Remove unused variable from r195944.Lang Hames2013-11-291-1/+0
| | | | llvm-svn: 195945
* Refactor a lot of patchpoint/stackmap related code to simplify and make itLang Hames2013-11-294-15/+210
| | | | | | | | | | | | | | | | | | | | | | target independent. Most of the x86 specific stackmap/patchpoint handling was necessitated by the use of the native address-mode format for frame index operands. PEI has now been modified to treat stackmap/patchpoint similarly to DEBUG_INFO, allowing us to use a simple, platform independent register/offset pair for frame indexes on stackmap/patchpoints. Notes: - Folding is now platform independent and automatically supported. - Emiting patchpoints with direct memory references now just involves calling the TargetLoweringBase::emitPatchPoint utility method from the target's XXXTargetLowering::EmitInstrWithCustomInserter method. (See X86TargetLowering for an example). - No more ugly platform-specific operand parsers. This patch shouldn't change the generated output for X86. llvm-svn: 195944
* Remove an always true parameter.Rafael Espindola2013-11-281-6/+2
| | | | llvm-svn: 195931
* DebugInfo: Do not include variables only referenced by templates in aranges.David Blaikie2013-11-271-3/+6
| | | | | | | | ARanges included even extern variables referenced by pointer non-type template parameters even though that variable isn't part of this compilation unit. llvm-svn: 195895
* Show stackmap entry encodings in stackmap debug logs. This makes it easier toLang Hames2013-11-271-23/+27
| | | | | | | cross-reference debug output with encoded stack-maps, and to create stackmap test-cases. llvm-svn: 195874
* Use the same tls section name as msvc.Rafael Espindola2013-11-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently error in clang with: "error: thread-local storage is unsupported for the current target", but we can start to get the llvm level ready. When compiling template<typename T> struct foo { static __declspec(thread) int bar; }; template<typename T> __declspec(therad) int foo<T>::bar; template struct foo<int>; msvc produces SECTION HEADER #3 .tls$ name 0 physical address 0 virtual address 4 size of raw data 12F file pointer to raw data (0000012F to 00000132) 0 file pointer to relocation table 0 file pointer to line numbers 0 number of relocations 0 number of line numbers C0301040 flags Initialized Data COMDAT; sym= "public: static int foo<int>::bar" (?bar@?$foo@H@@2HA) 4 byte align Read Write gcc produces a ".data$__emutls_v.<symbol>" for the testcase with __declspec(thread) replaced with thread_local. llvm-svn: 195849
* Use simple section names for COMDAT sections on COFF.Rafael Espindola2013-11-271-21/+17
| | | | | | | | | | | | With this patch we use simple names for COMDAT sections (like .text or .bss). This matches the MSVC behavior. When merging it is the COMDAT symbol that is used to decide if two sections should be merged, so there is no point in building a fancy name. This survived a bootstrap on mingw32. llvm-svn: 195798
* 80-column fixups.Eric Christopher2013-11-263-3/+7
| | | | llvm-svn: 195790
* DwarfDebug: Include type units in accelerator tables.David Blaikie2013-11-262-25/+31
| | | | | | | Since type units aren't in the CUMap, use the DwarfUnits list to iterate over units for tasks such as accelerator table building. llvm-svn: 195776
* Rename DwarfException methods so the new names are consistent with ↵Timur Iskhodzhanov2013-11-266-50/+50
| | | | | | DwarfDebug and the style guide llvm-svn: 195763
* StackMap: Implement support for DirectMemRefOp.Andrew Trick2013-11-261-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A Direct stack map location records the address of frame index. This address is itself the value that the runtime requested. This differs from IndirectMemRefOp locations, which refer to a stack locations from which the requested values must be loaded. Direct locations can directly communicate the address if an alloca, while IndirectMemRefOp handle register spills. For example: entry: %a = alloca i64... llvm.experimental.stackmap(i32 <ID>, i32 <shadowBytes>, i64* %a) Since both the alloca and stackmap intrinsic are in the entry block, and the intrinsic takes the address of the alloca, the runtime can assume that LLVM will not substitute alloca with any intervening value. This must be verified by the runtime by checking that the stack map's location is a Direct location type. The runtime can then determine the alloca's relative location on the stack immediately after compilation, or at any time thereafter. This differs from Register and Indirect locations, because the runtime can only read the values in those locations when execution reaches the instruction address of the stack map. llvm-svn: 195712
* DebugInfo: Remove CompileUnit::constructTypeDIEImpl now that it's just a ↵David Blaikie2013-11-262-15/+2
| | | | | | | | | simple wrapper again. r195698 moved the type unit checking up into getOrCreateTypeDIE so remove the redundant check and fold the functions back together again. llvm-svn: 195700
* DebugInfo: Avoid emitting pubtype entries for type DIEs that just indirect ↵David Blaikie2013-11-261-37/+43
| | | | | | to a type unit. llvm-svn: 195698
* DebugInfo: Pubtypes: Coelesce pubtype registration with accelerator type ↵David Blaikie2013-11-263-49/+13
| | | | | | | | | | registration. It might be possible to eventually use one data structure, but I haven't looked at the exact criteria used for accelerator tables and pubtypes to see if there's good reason for the differences between the two or not. llvm-svn: 195696
* Unrevert r195599 with testcase fix.Bill Wendling2013-11-251-0/+5
| | | | | | | I'm not sure how it was checking for the wrong values... PR18023. llvm-svn: 195670
* Revert r195599 as it broke the builds.Amara Emerson2013-11-251-5/+0
| | | | llvm-svn: 195636
* Fixed tryFoldToZero() for vector types that need expansion.Daniel Sanders2013-11-252-15/+4
| | | | | | | | | | | | | | | | | | | | | | Summary: Moved the requirement for SelectionDAG::getConstant() to return legally typed nodes slightly earlier. There were two optional DAGCombine passes that were missed out and were required to produce type-legal DAGs. Simplified a code-path in tryFoldToZero() to use SelectionDAG::getConstant(). This provides support for both promoted and expanded vector types whereas the previous code only supported promoted vector types. Fixes a "Type for zero vector elements is not legal" assertion detected by an llvm-stress generated test. Reviewers: resistor CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2251 llvm-svn: 195635
* Don't look past volatile loads.Bill Wendling2013-11-251-0/+5
| | | | | | | A volatile load should block us from trying to coalesce stores. PR18023 llvm-svn: 195599
* Output a bit more information in the debug printing for MBP. This wasChandler Carruth2013-11-251-3/+4
| | | | | | useful when analyzing parts of zlib's behavior here. llvm-svn: 195588
* DwarfDebug: Move ownership of CompileUnits into DwarfUnitsDavid Blaikie2013-11-232-13/+8
| | | | | | | | | | This avoids the need for an extra list of SkeletonCUs and associated cleanup while staging things to be cleaner for further type unit improvements. Also hopefully fixes a memory leak introduced in r195166. llvm-svn: 195536
* Refactor DW_AT_ranges handling to use labels for ranges rather thanEric Christopher2013-11-231-23/+24
| | | | | | | | | a non-relocatable number offset. One fixme to make the ranges as discrete data structures and have range lists explicitly represented rather than as a list of symbols. llvm-svn: 195523
* Reformat const for readability.Eric Christopher2013-11-231-6/+4
| | | | llvm-svn: 195522
* Teach ISel not to optimize 'optnone' functions (revised).Paul Robinson2013-11-221-0/+44
| | | | | | | | | | | | | Improvements over r195317: - Set/restore EnableFastISel flag instead of just running FastISel within SelectAllBasicBlocks; the flag is checked in various places, and FastISel won't run properly if those places don't do the right thing. - Test looks for normal ISel versus FastISel behavior, and not something more subtle that doesn't work everywhere. Based on work by Andrea Di Biagio. llvm-svn: 195491
* DEBUG shouldEvict decisionsAndrew Trick2013-11-222-3/+7
| | | | llvm-svn: 195490
* Minor cleanup. EvictionCost ctor was confusing relative to the other costs ↵Andrew Trick2013-11-221-3/+9
| | | | | | floating around in the code. llvm-svn: 195489
* patchpoint: factor SD builder code for live vars. Plain stackmap also ↵Andrew Trick2013-11-221-13/+19
| | | | | | optimizes Constant values now. llvm-svn: 195488
* patchpoint: eliminate hard coded operand indices.Andrew Trick2013-11-221-13/+19
| | | | llvm-svn: 195487
* SelectionDAG: Optimize expansion of vec_type = BITCAST scalar_typeTom Stellard2013-11-222-10/+41
| | | | | | | | | The legalizer can now do this type of expansion for more type combinations without loading and storing to and from the stack. NOTE: This is a candidate for the 3.4 branch. llvm-svn: 195398
* Split SETCC if VSELECT requires splitting too.Tom Stellard2013-11-222-21/+43
| | | | | | | | | | | | | This patch is a rewrite of the original patch commited in r194542. Instead of relying on the type legalizer to do the splitting for us, we now peform the splitting ourselves in the DAG combiner. This is necessary for the case where the vector mask is a legal type after promotion and still wouldn't require splitting. Patch by: Juergen Ributzka NOTE: This is a candidate for the 3.4 branch. llvm-svn: 195397
* In Dwarf 3 (and Dwarf 2) attributes whose value are offsets into aEric Christopher2013-11-214-52/+92
| | | | | | | | | | | | | | | | | | | | | section use the form DW_FORM_data4 whilst in Dwarf 4 and later they use the form DW_FORM_sec_offset. This patch updates the places where such attributes are generated to use the appropriate form depending on the Dwarf version. The DIE entries affected have the following tags: DW_AT_stmt_list, DW_AT_ranges, DW_AT_location, DW_AT_GNU_pubnames, DW_AT_GNU_pubtypes, DW_AT_GNU_addr_base, DW_AT_GNU_ranges_base It also adds a hidden command line option "--dwarf-version=<uint>" to llc which allows the version of Dwarf to be generated to override what is specified in the metadata; this makes it possible to update existing tests to check the debugging information generated for both Dwarf 4 (the default) and Dwarf 3 using the same metadata. Patch (slightly modified) by Keith Walker! llvm-svn: 195391
* Move member variable up to where the rest of non-DWARF5 variables reside.Eric Christopher2013-11-211-3/+3
| | | | llvm-svn: 195380
* Add support for legalizing SETNE/SETEQ by inverting the condition code and ↵Daniel Sanders2013-11-211-14/+54
| | | | | | | | | | | | | | | | | | | | | | | | | the result of the comparison. Summary: LegalizeSetCCCondCode can now legalize SETEQ and SETNE by returning the inverse condition and requesting that the caller invert the result of the condition. The caller of LegalizeSetCCCondCode must handle the inverted CC, and they do so as follows: SETCC, BR_CC: Invert the result of the SETCC with SelectionDAG::getNOT() SELECT_CC: Swap the true/false operands. This is necessary for MSA which lacks an integer SETNE instruction. Reviewers: resistor CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2229 llvm-svn: 195355
* Revert r195317 (and r195333), "Teach ISel not to optimize 'optnone' functions."NAKAMURA Takumi2013-11-211-40/+1
| | | | | | | | It broke, at least, i686 target. It is reproducible with "llc -mtriple=i686-unknown". FYI, it didn't appear to add either "-O0" or "-fast-isel". llvm-svn: 195339
* Teach ISel not to optimize 'optnone' functions.Paul Robinson2013-11-211-1/+40
| | | | | | Based on work by Andrea Di Biagio. llvm-svn: 195317
* Move DebugInfoOffset member near the other data member it helps describe.Eric Christopher2013-11-212-7/+7
| | | | llvm-svn: 195299
* Reflow some documentation and remove whitespace comments. MoveEric Christopher2013-11-211-27/+10
| | | | | | DebugInfoOffset data member up with the rest of the data members. llvm-svn: 195298
* Add more documenation for the lookup tables data members.Eric Christopher2013-11-211-0/+3
| | | | llvm-svn: 195297
* Reorder language in the CompileUnit description and add a comment.Eric Christopher2013-11-212-6/+7
| | | | | | Language may only be a temporary addition. llvm-svn: 195296
* Update comment.Eric Christopher2013-11-211-2/+2
| | | | llvm-svn: 195293
* Constify the DIEs used for pubname and pubtype tables. PropagateEric Christopher2013-11-214-15/+15
| | | | | | through findAttribute etc. llvm-svn: 195290
* MachineBlockPlacement: Strengthen the source order bias when picking an exit ↵Benjamin Kramer2013-11-201-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | block. We now only allow breaking source order if the exit block frequency is significantly higher than the other exit block. The actual bias is currently under a flag so the best cut-off can be found; the flag defaults to the old behavior. The idea is to get some benchmark coverage over different values for the flag and pick the best one. When we require the new frequency to be at least 20% higher than the old frequency I see a 5% speedup on zlib's deflate when compressing a random file on x86_64/westmere. Hal reported a small speedup on Fhourstones on a BG/Q and no regressions in the test suite. The test case is the full long_match function from zlib's deflate. I was reluctant to add it for previous tweaks to branch probabilities because it's large and potentially fragile, but changed my mind since it's an important use case and more likely to break with all the current work going into the PGO infrastructure. Differential Revision: http://llvm-reviews.chandlerc.com/D2202 llvm-svn: 195265
* DwarfCompileUnit: Initialize DebugInfoOffset.David Blaikie2013-11-201-2/+2
| | | | | | | | | | | | While not strictly necessary (the class has an invariant that "setDebugInfoOffset" is called before "getDebugInfoOffset" - anyone client that actually gets the default zero offset is buggy/broken) this is consistent with the code as originally written and the removal of the initialization was an accident in r195166. Suggested by Manman Ren. llvm-svn: 195263
* CR feedback for r195166: Add comments regarding type unit mapping and type ↵David Blaikie2013-11-202-3/+12
| | | | | | | | units disabling cross-CU sharing. Changes suggested by Manman Ren. llvm-svn: 195262
OpenPOWER on IntegriCloud