summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Don't assert on invalid loop vectorization hint.Eli Friedman2013-09-101-7/+10
| | | | llvm-svn: 190450
* Fix another mistake in r190442.Eli Friedman2013-09-101-0/+29
| | | | | | Sorry about that; I'll try to be more careful about DEBUG mode. llvm-svn: 190449
* Fix unused variables.Eli Friedman2013-09-105-7/+2
| | | | llvm-svn: 190448
* Fix mistake in r190442.Eli Friedman2013-09-101-0/+7
| | | | llvm-svn: 190446
* Remove unused functions.Eli Friedman2013-09-105-55/+0
| | | | llvm-svn: 190442
* Hoist section call out of loop.Eric Christopher2013-09-101-2/+2
| | | | llvm-svn: 190440
* Teach ScalarEvolution about pointer address spacesMatt Arsenault2013-09-103-13/+23
| | | | llvm-svn: 190425
* Fix typoMatt Arsenault2013-09-101-1/+1
| | | | llvm-svn: 190424
* Add getenv() wrapper that works on multibyte environment variable.Rui Ueyama2013-09-104-56/+113
| | | | | | | | | | | | | | | | | | On Windows, character encoding of multibyte environment variable varies depending on settings. The only reliable way to handle it I think is to use GetEnvironmentVariableW(). GetEnvironmentVariableW() works on wchar_t string, which is on Windows UTF16 string. That's not ideal because we use UTF-8 as the internal encoding in LLVM. This patch defines a wrapper function which takes and returns UTF-8 string for GetEnvironmentVariableW(). The wrapper function does not do any conversion and just forwards the argument to getenv() on Unix. Differential Revision: http://llvm-reviews.chandlerc.com/D1612 llvm-svn: 190423
* LoopVectorize: PHI nodes are always at the beginning of a block, no need to ↵Benjamin Kramer2013-09-101-2/+2
| | | | | | scan the whole block. llvm-svn: 190422
* Debug Info: create scope children DIEs when the scope DIE is not null.Manman Ren2013-09-102-19/+54
| | | | | | | | | | | | | | | | We try to create the scope children DIEs after we create the scope DIE. But to avoid emitting empty lexical block DIE, we first check whether a scope DIE is going to be null, then create the scope children if it is not null. From the number of children, we decide whether to actually create the scope DIE. This patch also removes an early exit which checks for a special condition. It also removes deletion of un-used children DIEs that are generated because we used to generate children DIEs before the scope DIE. Deletion of un-used children DIEs may cause problem because we sometimes keep created DIEs in a member variable of a CU. llvm-svn: 190421
* Debug Info: define a DIRef template.Manman Ren2013-09-103-28/+23
| | | | | | | | | | | | | Specialize the constructors for DIRef<DIScope> and DIRef<DIType> to make sure the Value is indeed a scope ref and a type ref. Use DIScopeRef for DIScope::getContext and DIType::getContext and use DITypeRef for getContainingType and getClassType. DIScope::generateRef now returns a DIScopeRef instead of a "Value *" for readability and type safety. llvm-svn: 190418
* ARM: Use the PICADD opcode calculated.Jim Grosbach2013-09-101-2/+6
| | | | | | | | | | | | | | We were figuring out whether to use tPICADD or PICADD, then just using tPICADD unconditionally anyway. Oops. A testcase from someone familiar enough with ELF to produce one would be appreciated. The existing PIC testcase correctly verifies the .s generated, but that doesn't catch this bug, which only showed up in direct-to-object mode. http://llvm.org/bugs/show_bug.cgi?id=17180 llvm-svn: 190417
* Remove unused private member in ARMAsmPrinter.cpp.Logan Chien2013-09-101-1/+1
| | | | | | | This commit removes the unused "AttributeItem" from ObjectAttributeEmitter. llvm-svn: 190412
* [asan] refactor the use-after-return API so that the size class is computed ↵Kostya Serebryany2013-09-101-10/+32
| | | | | | at compile time instead of at run-time. llvm part llvm-svn: 190407
* [SystemZ] Update README.Richard Sandiford2013-09-101-9/+5
| | | | llvm-svn: 190404
* [SystemZ] Add TM and TMYRichard Sandiford2013-09-104-14/+25
| | | | | | | | | | | | | | | | | | | | | | | The main complication here is that TM and TMY (the memory forms) set CC differently from the register forms. When the tested bits contain some 0s and some 1s, the register forms set CC to 1 or 2 based on the value the uppermost bit. The memory forms instead set CC to 1 regardless of the uppermost bit. Until now, I've tried to make it so that a branch never tests for an impossible CC value. E.g. NR only sets CC to 0 or 1, so branches on the result will only test for 0 or 1. Originally I'd tried to do the same thing for TM and TMY by using custom matching code in ISelDAGToDAG. That ended up being very ugly though, and would have meant duplicating some of the chain checks that the common isel code does. I've therefore gone for the simpler alternative of adding an extra operand to the TM DAG opcode to say whether a memory form would be OK. This means that the inverse of a "TM;JE" is "TM;JNE" rather than the more precise "TM;JNLE", just like the inverse of "TMLL;JE" is "TMLL;JNE". I suppose that's arguably less confusing though... llvm-svn: 190400
* [mips][msa] Removed unsupported dot product instructions (dotp_[su].b)Daniel Sanders2013-09-101-8/+0
| | | | | | The dotp_[su].b instructions never existed in any revision of the MSA spec. llvm-svn: 190398
* Add test cases for Mips mthc1/mfhc1 instructions. Add check for odd value of ↵Vladimir Medic2013-09-101-0/+4
| | | | | | register when PFU is 32 bit. llvm-svn: 190397
* Remove obsolete code from MipsAsmParser.cpp.Vladimir Medic2013-09-101-22/+0
| | | | llvm-svn: 190396
* MCObjectFileInfo.cpp: Fix a couple of possible typo(s), ↵NAKAMURA Takumi2013-09-101-2/+2
| | | | | | | | s/DwarfPub/DwarfGnuPub/, in r190344. XFAIL can be removed. (in r190374) llvm-svn: 190386
* Don't use getSetCCResultType for creating a vselectMatt Arsenault2013-09-101-2/+1
| | | | | | | | | | | | | | | | | | | The vselect mask isn't a setcc. This breaks in the case when the result of getSetCCResultType is larger than the vector operands e.g. %tmp = select i1 %cmp <2 x i8> %a, <2 x i8> %b when getSetCCResultType returns <2 x i32>, the assertion that the (MaskTy.getSizeInBits() == Op1.getValueType().getSizeInBits()) is hit. No test since I don't think I can hit this with any of the current targets. The R600/SI implementation would break, since it returns a vector of i1 for this, but it doesn't reach ExpandSELECT for other reasons. llvm-svn: 190376
* Use StringRef::npos for StringRef instead of std::string oneMatt Arsenault2013-09-101-3/+3
| | | | llvm-svn: 190375
* Revert r190366. It was breaking build bots.Bill Wendling2013-09-101-1/+1
| | | | llvm-svn: 190373
* Enable -misched-cyclicpath by default.Andrew Trick2013-09-091-1/+1
| | | | llvm-svn: 190367
* Use a default value for the prologue's debug location.Bill Wendling2013-09-091-1/+1
| | | | llvm-svn: 190366
* Debug Info: In DIBuilder, the context fields of a TAG_inheritance and aManman Ren2013-09-091-2/+2
| | | | | | | | TAG_friend are updated to use scope reference. Added testing cases to verify that class with inheritance can be uniqued. llvm-svn: 190364
* Debug Info: move DIScope::getContext back from DwarfDebug.Manman Ren2013-09-094-27/+24
| | | | | | | | This partially reverts r190330. DIScope::getContext now returns DIScopeRef instead of DIScope. We construct a DIScopeRef from DIScope when we are dealing with subprogram, lexical block or name space. llvm-svn: 190362
* mi-sched: smooth out the cyclicpath heuristic.Andrew Trick2013-09-091-1/+4
| | | | | | | | | | | | | | | Arnold's idea. I generally try to avoid stateful heuristics because it can make debugging harder. However, we need a way to prevent the latency priority from dominating, and it somewhat makes sense to schedule aggressively for latency only within an issue group. Swift in particular likes this, and it doesn't hurt anyone else: | Benchmarks/MiBench/consumer-lame | 10.39% | | Benchmarks/Misc/himenobmtxpa | 9.63% | llvm-svn: 190360
* white spaces and long linesJack Carter2013-09-091-45/+81
| | | | llvm-svn: 190358
* Don't shrink atomic ops to bool in GlobalOpt.Eli Friedman2013-09-091-4/+7
| | | | | | | | | LLVM IR doesn't currently allow atomic bool load/store operations, and the transformation is dubious anyway because it isn't profitable on all platforms. PR17163. llvm-svn: 190357
* Set the encoding to '0' if we don't have an MAB.Bill Wendling2013-09-091-2/+1
| | | | llvm-svn: 190354
* [InstCombiner] Expose opportunities to merge subtract and comparison.Quentin Colombet2013-09-091-1/+46
| | | | | | | | | | | | | | | | | | | | | Several architectures use the same instruction to perform both a comparison and a subtract. The instruction selection framework does not allow to consider different basic blocks to expose such fusion opportunities. Therefore, these instructions are “merged” by CSE at MI IR level. To increase the likelihood of CSE to apply in such situation, we reorder the operands of the comparison, when they have the same complexity, so that they matches the order of the most frequent subtract. E.g., icmp A, B ... sub B, A <rdar://problem/14514580> llvm-svn: 190352
* Always add global names. We're adding them in the rest of the codeEric Christopher2013-09-091-3/+2
| | | | | | | | | as well as types. No functional change as they're not emitted unless the option is true anyhow. llvm-svn: 190346
* Rename for consistency.Eric Christopher2013-09-092-4/+4
| | | | llvm-svn: 190345
* Add the gnu pubnames and pubtypes sections to the mc object fileEric Christopher2013-09-091-0/+24
| | | | | | handling. llvm-svn: 190344
* Add constant defines for gnu pubnames and gnu pubtypes - they're usedEric Christopher2013-09-091-0/+23
| | | | | | for the gdb index as the names convey. llvm-svn: 190343
* Call generateCompactUnwindEncodings() right before we need to output the ↵Bill Wendling2013-09-096-18/+18
| | | | | | | | | | | | | frame information. There are more than one paths to where the frame information is emitted. Place the call to generateCompactUnwindEncodings() into the method which outputs the frame information, thus ensuring that the encoding is there for every path. This involved threading the MCAsmBackend object through to this method. <rdar://problem/13623355> llvm-svn: 190335
* Debug Info: Use DIScopeRef for DIType::getContext.Manman Ren2013-09-095-12/+20
| | | | | | | | | | | | | | | | | In DIBuilder, the context field of a TAG_member is updated to use the scope reference. Verifier is updated accordingly. DebugInfoFinder now needs to generate a type identifier map to have access to the actual scope. Same applies for BreakpointPrinter. processModule of DebugInfoFinder is called during initialization phase of the verifier to make sure the type identifier map is constructed early enough. We are now able to unique a simple class as demonstrated by the added testing case. llvm-svn: 190334
* Debug Info: move DIScope::getContext to DwarfDebug.Manman Ren2013-09-094-28/+31
| | | | | | | | | | | | DIScope::getContext is a wrapper function that calls the specific getContext method on each subclass. When we switch DIType::getContext to return DIScopeRef instead of DIScope, DIScope::getContext can no longer return a DIScope without a type identifier map. DIScope::getContext is only used by DwarfDebug, so we move it to DwarfDebug to have easy access to the type identifier map. llvm-svn: 190330
* Revert patches to add case-range support for PR1255.Bob Wilson2013-09-0912-269/+167
| | | | | | | | | | | | | | | | | The work on this project was left in an unfinished and inconsistent state. Hopefully someone will eventually get a chance to implement this feature, but in the meantime, it is better to put things back the way the were. I have left support in the bitcode reader to handle the case-range bitcode format, so that we do not lose bitcode compatibility with the llvm 3.3 release. This reverts the following commits: 155464, 156374, 156377, 156613, 156704, 156757, 156804 156808, 156985, 157046, 157112, 157183, 157315, 157384, 157575, 157576, 157586, 157612, 157810, 157814, 157815, 157880, 157881, 157882, 157884, 157887, 157901, 158979, 157987, 157989, 158986, 158997, 159076, 159101, 159100, 159200, 159201, 159207, 159527, 159532, 159540, 159583, 159618, 159658, 159659, 159660, 159661, 159703, 159704, 160076, 167356, 172025, 186736 llvm-svn: 190328
* Debug Info: Move isSubprogramContext from DebugInfo to DwarfDebug.Manman Ren2013-09-094-14/+18
| | | | | | | | | | This helper function needs the type identifier map when we switch DIType::getContext to return DIScopeRef instead of DIScope. Since isSubprogramContext is used by DwarfDebug only, We move it to DwarfDebug to have easy access to the map. llvm-svn: 190325
* Debug Info: Rename DITypeRef to DIScopeRef.Manman Ren2013-09-093-29/+35
| | | | | | | | | | | | | | | | | | | | | | A reference to a scope is more general than a reference to a type since DIType is a subclass of DIScope. A reference to a type can be either an identifier for the type or the DIType itself, while a reference to a scope can be either an identifier for the type (when the scope is indeed a type) or the DIScope itself. A reference to a type and a reference to a scope will be resolved in the same way. The only difference is in the verifier when a field is a reference to a type (i.e. the containing type field of a DICompositeType) or a field is a reference to a scope (i.e. the context field of a DIType). This is to get ready for switching DIType::getContext to return DIScopeRef instead of DIScope. Tighten up isTypeRef and isScopeRef to make sure the identifier is not empty and the MDNode is DIType for TypeRef and DIScope for ScopeRef. llvm-svn: 190322
* Debug Info: Update isScope to make sure DIType is a scope andManman Ren2013-09-091-1/+2
| | | | | | TAG_file_type is also a scope. llvm-svn: 190321
* [mips] When double precision loads and stores are split into two i32 loads andAkira Hatanaka2013-09-091-3/+3
| | | | | | | stores, make sure the load or store that accesses the higher half does not have an alignment that is larger than the offset from the original address. llvm-svn: 190318
* [stackprotector] Modernize code with IRBuilderBenjamin Kramer2013-09-091-32/+17
| | | | llvm-svn: 190317
* [ARMv8] Prevent generation of deprecated IT blocks on ARMv8 in Thumb mode.Joey Gouly2013-09-095-57/+139
| | | | | | | | | IT blocks can only be one instruction lonf, and can only contain a subset of the 16 instructions. Patch by Artyom Skrobov! llvm-svn: 190309
* A better way to silence the warning in MSVC (replaces r190304).Aaron Ballman2013-09-091-2/+1
| | | | llvm-svn: 190308
* Silencing a warning about control flow reaching the end of a non-void function.Aaron Ballman2013-09-091-0/+1
| | | | llvm-svn: 190304
* XCore handling of thread local loweringRobert Lytton2013-09-091-9/+94
| | | | | | | | | | | Fix XCoreLowerThreadLocal trying to initialise globals which have no initializer. Add handling of const expressions containing thread local variables. These need to be replaced with instructions, as the thread ID is used to access the thread local variable. llvm-svn: 190300
OpenPOWER on IntegriCloud