summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* R600: Factor i64 UDIVREM lowering into its own fuctionTom Stellard2014-11-153-68/+84
| | | | | | | | This is so it could potentially be used by SI. However, the current implementation does not always produce correct results, so the IntegerDivisionPass is being used instead. llvm-svn: 222072
* DIBuilder: Use Constant instead of ValueDuncan P. N. Exon Smith2014-11-152-47/+37
| | | | | | | | | 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-152-21/+11
| | | | llvm-svn: 222068
* IR: Remove MDString logic for Value::hasName()Duncan P. N. Exon Smith2014-11-141-1/+1
| | | | | | This isn't necessary after r221960. llvm-svn: 222067
* DIBuilder: Cleanup access control style, NFCDuncan P. N. Exon Smith2014-11-141-2/+1
| | | | llvm-svn: 222066
* DI: Use Metadata for DITypeRef and DIScopeRefDuncan P. N. Exon Smith2014-11-142-23/+26
| | | | | | | | | | 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-147-26/+29
| | | | | | | | | | | | | | | | | | | | 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-148-5/+159
| | | | | | | | | | | | | | | | | 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-142-97/+131
| | | | | | | | | | | | 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-142-2/+16
| | | | | | | | | | | 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
* ARM: simplify test.Tim Northover2014-11-141-19/+2
| | | | | | | | The test's DWARF stubs were there just to trigger the emission of .cfi directives. Fortunately, the NetBSD ABI already demands proper DWARF unwind info, so it's easier to just use that triple. llvm-svn: 222055
* Rerun AutoRegen.sh.Eric Christopher2014-11-141-0/+3
| | | | llvm-svn: 222050
* Turn a leaked object into a stack variable instead.David Blaikie2014-11-141-19/+19
| | | | llvm-svn: 222046
* Add the code and test cases for 64-bit ARM to llvm-objdump’s Mach-O ↵Kevin Enderby2014-11-147-23/+210
| | | | | | | | | symbolizer. FYI, removed the unused MCInstrAnalysis as it does not exist for 64-bit ARM and was causing a “couldn't initialize disassembler for target” error. llvm-svn: 222045
* Add a test for r222029 that doesn't rely on the default target being a COFF ↵Frederic Riss2014-11-141-3/+5
| | | | | | platform. llvm-svn: 222041
* InstCombine: Fix infinite loop caused by visitFPTruncDavid Majnemer2014-11-142-6/+19
| | | | | | | | | | | 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-143-168/+231
| | | | | | | | | | | | | | | | | 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
* Change order of tablegen generated fast-isel instruction code to beBill Schmidt2014-11-141-105/+101
| | | | | | | | | | | | | | | | | | | | | based on instruction complexity The order that tablegen fast-isel instruction code is generated is currently based on the text of the predicate (using string less-than). This patch changes this to instead use the instruction complexity. Because the complexities are not unique a C++ multimap is used instead of a map. This fixes the problem where code with no predicate always comes out first (the empty string always compares as less than all other strings) thus making the code with predicates dead code. See the FMUL code in PPCFastISel.cpp for an example. It also more closely matches the normal codegen ordering. Some error checking in the tablegen fast-isel code is fixed as well. Patch by Bill Seurer. llvm-svn: 222038
* 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-142-1/+43
| | | | | | | | | | 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-1410-10/+363
| | | | llvm-svn: 222032
* yaml2obj, COFF: Correctly calculate SizeOfImage and SizeOfHeadersDavid Majnemer2014-11-141-9/+16
| | | | | | | | SizeOfHeaders must be aligned to the FileAlignment. SizeOfImage must be at least the SizeOfHeaders aligned to the SectionAlignment. llvm-svn: 222030
* [dwarfdump] Handle relocations in Dwarf accelerator tablesFrederic Riss2014-11-145-25/+41
| | | | | | | | | | | 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-144-5/+5
| | | | llvm-svn: 222023
* IR: Make MDString inherit from MetadataDuncan P. N. Exon Smith2014-11-142-8/+4
| | | | llvm-svn: 222022
* R600/SI: Fix verifier error from a branch on IMPLICIT_DEFMatt Arsenault2014-11-143-22/+29
| | | | | | SIILowerI1Copies wasn't correctly handling this case. llvm-svn: 222020
* IR: Take an LLVMContext in Metadata::Metadata()Duncan P. N. Exon Smith2014-11-142-2/+5
| | | | 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-144-29/+284
| | | | llvm-svn: 222015
* R600/SI: Use S_BFE_I64 for 64-bit sext_inregMatt Arsenault2014-11-146-44/+196
| | | | llvm-svn: 222012
* [Reassociate] Canonicalize the operands of all binary operators.Chad Rosier2014-11-143-13/+32
| | | | llvm-svn: 222008
* Tentatively appease the bots.Frederic Riss2014-11-141-1/+1
| | | | | | | | If this workaround gets the bots green, then we have to find out why the -dwarf-accel-tables=Enable option doesn't work as expected on non-darwin platforms. llvm-svn: 222007
* [Reassociate] Canonicalize operands of vector binary operators.Chad Rosier2014-11-142-8/+51
| | | | | | | | 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-144-19/+24
| | | | llvm-svn: 222005
* Reapply "[dwarfdump] Add support for dumping accelerator tables."Frederic Riss2014-11-1410-1/+285
| | | | | | | | | | | | | 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-143-44/+123
| | | | 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-1417-30/+514
| | | | | | | 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-143-2/+40
| | | | | | | | | 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
* Calm down build botsDavid Majnemer2014-11-141-2/+2
| | | | | | | r221975 seemed to trigger an ambiguous conversion that only irritated clang, not gcc. llvm-svn: 221977
* obj2yaml, yaml2obj: Add support for COFF executablesDavid Majnemer2014-11-147-52/+393
| | | | | | | | | | | | | | | | 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
* Use size_type for operator[].Rafael Espindola2014-11-141-2/+2
| | | | | | | | | | This matches std::vector and is more efficient as it avoids truncations. With this the text segment of opt goes from 19705442 bytes to 19703930 bytes. llvm-svn: 221973
* 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-145-43/+66
| | | | | | | | 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-142-7/+18
| | | | | | | | | | | | 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-144-15/+24
| | | | | | | | | | 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
OpenPOWER on IntegriCloud