summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* DIBuilder: Use Constant instead of ValueDuncan P. N. Exon Smith2014-11-151-29/+20
| | | | | | | | | Make explicit the requirement that most IR values in `DIBuilder` are `Constant`. This requires a follow-up change in clang. Part of PR21532. llvm-svn: 222070
* DIBuilder: Change private helper function to static, NFCDuncan P. N. Exon Smith2014-11-151-14/+11
| | | | llvm-svn: 222068
* DI: Use Metadata for DITypeRef and DIScopeRefDuncan P. N. Exon Smith2014-11-141-18/+20
| | | | | | | | | | Now that `MDString` and `MDNode` have a common base class, use it. Note that it's not useful to assume subclasses of `Metadata` must be one or the other since we'll be adding more subclasses soon enough. Part of PR21532. llvm-svn: 222064
* Rename EH related stuff to be more preciseReid Kleckner2014-11-146-18/+17
| | | | | | | | | | | | | | | | | | | | Summary: The current "WinEH" exception handling type is more about Itanium-style LSDA tables layered on top of the Windows native unwind info format instead of .eh_frame tables or EHABI unwind info. Use the name "ItaniumWinEH" to better reflect the hybrid nature of the design. Also rename isExceptionHandlingDWARF to usesItaniumLSDAForExceptions, since the LSDA is part of the Itanium C++ ABI document, and not the DWARF standard. Reviewers: echristo Subscribers: llvm-commits, compnerd Differential Revision: http://reviews.llvm.org/D6279 llvm-svn: 222062
* Don't make assumptions about the name of private global variables.Rafael Espindola2014-11-144-5/+103
| | | | | | | | | | | | | | | | | Private variables are can be renamed, so it is not reliable to make decisions on the name. The name is also dropped by the assembler before getting to the linker, so using the name causes a disconnect between how llvm makes a decision (var name) and how the linker makes a decision (section it is in). This patch changes one case where we were looking at the variable name to use the section instead. Test tuning by Michael Gottesman. llvm-svn: 222061
* ARM: refactor .cfi_def_cfa_offset emission.Tim Northover2014-11-141-97/+126
| | | | | | | | | | | | We use to track quite a few "adjusted" offsets through the FrameLowering code to account for changes in the prologue instructions as we went and allow the emission of correct CFA annotations. However, we were missing a couple of cases and the code was almost impenetrable. It's easier to just add any stack-adjusting instruction to a list and emit them together. llvm-svn: 222057
* ARM: correctly calculate the offset of FP in its push.Tim Northover2014-11-141-2/+7
| | | | | | | | | | | When we folded the DPR alignment gap into a push, we weren't noting the extra distance from the beginning of the push to the FP, and so FP ended up pointing at an incorrect offset. The .cfi_def_cfa_offset directives are still wrong in this case, but I think that can be improved by refactoring. llvm-svn: 222056
* InstCombine: Fix infinite loop caused by visitFPTruncDavid Majnemer2014-11-141-6/+9
| | | | | | | | | | | We would attempt to replace a fptrunc of an frem with an identical fptrunc. This would cause the new fptrunc to be added to the worklist. Of course, this results in an infinite loop because we will keep visiting the newly created fptruncs. This fixes PR21576. llvm-svn: 222040
* Reapply r221924: "[GVN] Perform Scalar PRE on gep indices that feed loads beforeChad Rosier2014-11-141-161/+175
| | | | | | | | | | | | | | | | | doing Load PRE" This commit updates the failing test in Analysis/TypeBasedAliasAnalysis/gvn-nonlocal-type-mismatch.ll The failing test is sensitive to the order in which we process loads. This version turns on the RPO traversal instead of the while DT traversal in GVN. The new test code is functionally same just the order of loads that are eliminated is swapped. This new version also fixes an issue where GVN splits a critical edge and potentially invalidate the RPO/DT iterator. llvm-svn: 222039
* R600/SI: Mark s_movk_i32 as rematerializableTom Stellard2014-11-141-0/+2
| | | | llvm-svn: 222037
* R600/SI: Fix spilling of m0 registerTom Stellard2014-11-141-1/+9
| | | | | | | | | | If we have spilled the value of the m0 register, then we need to restore it with v_readlane_b32 to a regular sgpr, because v_readlane_b32 can't write to m0. v_readlane_b32 can't write to m0, so llvm-svn: 222036
* COFF: Add support for Dwarf accelerator tables.Frederic Riss2014-11-141-0/+21
| | | | | | | | | This allows COFF targets to emit accelerator tables when requested by -dwarf-accel-tables=Enable instead of aborting. The test DebugInfo/cross-cu-inlining.ll covers this on COFF platforms. llvm-svn: 222034
* R600/SI: Combine min3/max3 instructionsMatt Arsenault2014-11-146-10/+135
| | | | llvm-svn: 222032
* [dwarfdump] Handle relocations in Dwarf accelerator tablesFrederic Riss2014-11-144-24/+40
| | | | | | | | | | | ELF targets (and maybe COFF) use relocations when referring to strings in the .debug_str section. Handle that in the accelerator table dumper. This commit restores the test/DebugInfo/cross-cu-inlining.ll test to its expected platform independant form, validating that the fix works (this test failed on linux boxes). llvm-svn: 222029
* Remove redundant virtual on overriden functions.David Blaikie2014-11-142-3/+3
| | | | llvm-svn: 222023
* IR: Make MDString inherit from MetadataDuncan P. N. Exon Smith2014-11-141-3/+0
| | | | llvm-svn: 222022
* R600/SI: Fix verifier error from a branch on IMPLICIT_DEFMatt Arsenault2014-11-141-0/+8
| | | | | | SIILowerI1Copies wasn't correctly handling this case. llvm-svn: 222020
* IR: Take an LLVMContext in Metadata::Metadata()Duncan P. N. Exon Smith2014-11-141-1/+4
| | | | llvm-svn: 222019
* Add a blank line, NFCDuncan P. N. Exon Smith2014-11-141-0/+1
| | | | llvm-svn: 222018
* Fix unused variable warning without assertsMatt Arsenault2014-11-141-0/+2
| | | | llvm-svn: 222017
* R600/SI: Match integer min / max instructionsMatt Arsenault2014-11-142-29/+86
| | | | llvm-svn: 222015
* R600/SI: Use S_BFE_I64 for 64-bit sext_inregMatt Arsenault2014-11-145-17/+82
| | | | llvm-svn: 222012
* [Reassociate] Canonicalize the operands of all binary operators.Chad Rosier2014-11-141-12/+12
| | | | llvm-svn: 222008
* [Reassociate] Canonicalize operands of vector binary operators.Chad Rosier2014-11-141-6/+1
| | | | | | | | Prior to this commit fmul and fadd binary operators were being canonicalized for both scalar and vector versions. We now canonicalize add, mul, and, or, and xor vector instructions. llvm-svn: 222006
* [Reassociate] Canonicalize constants to RHS operand.Chad Rosier2014-11-141-12/+17
| | | | llvm-svn: 222005
* Reapply "[dwarfdump] Add support for dumping accelerator tables."Frederic Riss2014-11-145-0/+200
| | | | | | | | | | | | | This reverts commit r221842 which was a revert of r221836 and of the test parts of r221837. This new version fixes an UB bug pointed out by David (along with addressing some other review comments), makes some dumping more resilient to broken input data and forces the accelerator tables to be dumped in the tests where we use them (this decision is platform specific otherwise). llvm-svn: 222003
* [AVX512] Add 512b masked integer shift by immediate patterns.Cameron McInally2014-11-142-29/+21
| | | | llvm-svn: 222002
* [Reassociate] Improve rank debug information. NFC.Chad Rosier2014-11-141-4/+5
| | | | llvm-svn: 221999
* R600/SI: Fix assembly names for exec_hi and exec_loTom Stellard2014-11-141-2/+2
| | | | llvm-svn: 221995
* R600/SI: Start implementing an assemblerTom Stellard2014-11-1413-30/+413
| | | | | | | This was done using the Sparc and PowerPC AsmParsers as guides. So far it is very simple and only supports sopp instructions. llvm-svn: 221994
* [PowerPC] Add VSX builtins for vec_divBill Schmidt2014-11-141-0/+6
| | | | | | | | | This patch adds builtin support for xvdivdp and xvdivsp, along with a test case. Straightforward stuff. There's a companion patch for Clang. llvm-svn: 221983
* obj2yaml, yaml2obj: Add support for COFF executablesDavid Majnemer2014-11-142-5/+115
| | | | | | | | | | | | | | | | In support of serializing executables, obj2yaml now records the virtual address and size of sections. It also serializes whatever we strictly need from the PE header, it expects that it can reconstitute everything else via inference. yaml2obj can reconstitute a fully linked executable. In order to get executables correctly serialized/deserialized, other bugs were fixed as a circumstance. We now properly respect file and section alignments. We also avoid writing out string tables unless they are strictly necessary. llvm-svn: 221975
* SearchForAddressOfSymbol(): Disable 3 symbols, copysignf, fminf, and fmaxf, ↵NAKAMURA Takumi2014-11-141-1/+1
| | | | | | on msc17. *These were added in VS 2013* llvm-svn: 221971
* R600/SI: Make constant array staticMatt Arsenault2014-11-141-1/+1
| | | | llvm-svn: 221965
* llvm-cov: Sink some reporting logic into CoverageMappingJustin Bogner2014-11-141-1/+9
| | | | | | | | This teaches CoverageMapping::getCoveredFunctions to filter to a particular file and uses that to replace most of the logic found in llvm-cov report. llvm-svn: 221962
* X86: use getConstant rather than getTargetConstant behind BUILD_VECTOR.Tim Northover2014-11-141-7/+7
| | | | | | | | | | | | getTargetConstant should only be used when you can guarantee the instruction selected will be able to cope with the raw value. BUILD_VECTOR is rather too generic for this so we should use getConstant instead. In that case, an instruction can still consume the constant, but if it doesn't it'll be materialised through its own round of ISel. Should fix PR21352. llvm-svn: 221961
* IR: Rewrite uniquing and creation of MDStringDuncan P. N. Exon Smith2014-11-143-9/+17
| | | | | | | | | | Stop using `Value::getName()` to get the string behind an `MDString`. Switch to `StringMapEntry<MDString>` so that we can find the string by its coallocation. This is part of PR21532. llvm-svn: 221960
* Fix 80 cols caught by the linter...David Blaikie2014-11-142-6/+9
| | | | | | We have a linter running in our build now? llvm-svn: 221957
* Fix build of Mips code with MSVC by using our macro instead of ↵Reid Kleckner2014-11-142-5/+4
| | | | | | __attribute__((unused)) directly llvm-svn: 221956
* Allow the use of functions as typeinfo in landingpad clausesReid Kleckner2014-11-146-21/+22
| | | | | | This is one step towards supporting SEH filter functions in LLVM. llvm-svn: 221954
* IR: Make MDString::getName() privateDuncan P. N. Exon Smith2014-11-131-1/+1
| | | | | | | | | | Hide the fact that `MDString`'s string is stored in `Value::Name` -- that's going to change soon. Update the only in-tree client that was using it instead of `Value::getString()`. Part of PR21532. llvm-svn: 221951
* Fix the VS 2012 buildReid Kleckner2014-11-131-5/+7
| | | | | | VS 2012 doesn't have fminf or fmaxf. llvm-svn: 221949
* First stage of call lowering for Mips fast-iselReed Kotler2014-11-133-2/+319
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This has most of what is needed for mips fast-isel call lowering for O32. What is missing I will add on the next patch because this patch is already too large. It should not be doing anything wrong but it will punt on some cases that it is basically capable of doing. The mechanism is there for parameters to be passed on the stack but I have not enabled it because it serves as a way for now to prevent some of the strange cases of O32 register passing that I have not fully checked yet and have some issues. The Mips O32 abi rules are very complicated as far how data is passed in floating and integer registers. However there is a way to think about this all very simply and this implementation reflects that. Basically, the ABI rules are written as if everything is passed on the stack and aligned as such. Once that is conceptually done, it is nearly trivial to reassign those locations to registers and then all the complexity disappears. So I have told tablegen that all the data is passed on the stack and during the lowering I fix this by assigning to registers as per the ABI doc. This has been my approach and you can line up what I did with the ABI document and see 1 to 1 what is going on. Test Plan: callabi.ll Reviewers: dsanders Reviewed By: dsanders Subscribers: jholewinski, echristo, ahatanak, llvm-commits, rfuhler Differential Revision: http://reviews.llvm.org/D5714 llvm-svn: 221948
* Fix symbol resolution of floating point libc builtins in MCJITReid Kleckner2014-11-132-9/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix for LLI failure on Windows\X86: http://llvm.org/PR5053 LLI.exe crashes on Windows\X86 when single precession floating point intrinsics like the following are used: acos, asin, atan, atan2, ceil, copysign, cos, cosh, exp, floor, fmin, fmax, fmod, log, pow, sin, sinh, sqrt, tan, tanh The above intrinsics are defined as inline-expansions in math.h, and are not exported by msvcr120.dll (Win32 API GetProcAddress returns null). For an FREM instruction, the JIT compiler generates a call to a stub for the fmodf() intrinsic, and adds a relocation to fixup at load time. The loader searches the libraries for the function, but fails because the symbol is not exported. So, the call target remains NULL and the execution crashes. Since the math functions are loaded at JIT/runtime, the JIT can patch CALL instruction directly instead of the searching the libraries' exported symbols. However, this fix caused build failures due to unresolved symbols like _fmodf at link time. Therefore, the current fix defines helper functions in the Runtime link/load library to perform the above operations. The address of these helper functions are used to patch up the CALL instruction at load time. Reviewers: lhames, rnk Reviewed By: rnk Differential Revision: http://reviews.llvm.org/D5387 Patch by Swaroop Sridhar! llvm-svn: 221947
* Silence MSVC warning on missing return after fully covered switchReid Kleckner2014-11-131-0/+1
| | | | llvm-svn: 221943
* R600/SI: Fix fmin_legacy / fmax_legacy matching for SIMatt Arsenault2014-11-135-33/+75
| | | | | | select_cc is expanded on SI, so this was never matched. llvm-svn: 221941
* Use nullptr instead of NULL for variadic sentinelsReid Kleckner2014-11-1311-90/+90
| | | | | | | | | | Windows defines NULL to 0, which when used as an argument to a variadic function, is not a null pointer constant. As a result, Clang's -Wsentinel fires on this code. Using '0' would be wrong on most 64-bit platforms, but both MSVC and Clang make it work on Windows. Sidestep the issue with nullptr. llvm-svn: 221940
* Revert "[GVN] Perform Scalar PRE on gep indices that feed loads before doing ↵Chad Rosier2014-11-131-166/+166
| | | | | | | | | Load PRE." This reverts commit r221924. It appears the commit was a bit premature and is causing bot failures that need further investigation. llvm-svn: 221939
* Move calls to push_back out of readAbbreviated(Literal|Field).Rafael Espindola2014-11-131-26/+13
| | | | | | | These functions always return a single value and not all callers want to push them into a SmallVector. llvm-svn: 221934
* Avoid usage of char16_t as MSVC "14" doesn't appear to support itReid Kleckner2014-11-131-4/+4
| | | | | | Fixes the MSVC "14" build. llvm-svn: 221932
OpenPOWER on IntegriCloud