summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* [yaml2obj] Support AArch64 relocations.Chad Rosier2014-11-101-0/+86
| | | | | | | Patch by Daniel Stewart <stewartd@codeaurora.org>! Phabricator Revision: http://reviews.llvm.org/D6192 llvm-svn: 221639
* Reverting r221626 due to a too-strict test.Michael Kuperstein2014-11-101-1/+0
| | | | llvm-svn: 221629
* [AArch64][FastISel] Fix kill flags for integer extends.Juergen Ributzka2014-11-101-0/+8
| | | | | | | | | In the case we optimize an integer extend away and replace it directly with the source register, we also have to clear all kill flags at all its uses. This is necessary, because the orignal IR instruction might be trivially dead, but we replaced it with a nop at MI level. llvm-svn: 221628
* [SwitchLowering] Fix the "fixPhis" function.Juergen Ributzka2014-11-101-8/+15
| | | | | | | | | | | | | | | Switch statements may have more than one incoming edge into the same BB if they all have the same value. When the switch statement is converted these incoming edges are now coming from multiple BBs. Updating all incoming values to be from a single BB is incorrect and would generate invalid LLVM IR. The fix is to only update the first occurrence of an incoming value. Switch lowering will perform subsequent calls to this helper function for each incoming edge with a new basic block - updating all edges in the process. This fixes rdar://problem/18916275. llvm-svn: 221627
* [X86] Fix pattern match for 32-to-64-bit zext in the presence of AssertSextMichael Kuperstein2014-11-101-0/+1
| | | | | | | | | This fixes an issue with matching trunc -> assertsext -> zext on x86-64, which would not zero the high 32-bits. See PR20494 for details. Differential Revision: http://reviews.llvm.org/D6128 llvm-svn: 221626
* Copy externally_initialized in GlobalVariable::copyAttributesFrom.Rafael Espindola2014-11-101-0/+1
| | | | | | Patch by Kevin Frei! llvm-svn: 221620
* [NVPTX] Add an NVPTX-specific TargetTransformInfoJingyue Wu2014-11-105-12/+115
| | | | | | | | | | | | | | | | | | | | Summary: It currently only implements hasBranchDivergence, and will be extended in later diffs. Split from D6188. Test Plan: make check-all Reviewers: jholewinski Reviewed By: jholewinski Subscribers: llvm-commits, meheff, eliben, jholewinski Differential Revision: http://reviews.llvm.org/D6195 llvm-svn: 221619
* Misc style fixes. NFC.Rafael Espindola2014-11-1011-353/+275
| | | | | | | | | | | | | This fixes a few cases of: * Wrong variable name style. * Lines longer than 80 columns. * Repeated names in comments. * clang-format of the above. This make the next patch a lot easier to read. llvm-svn: 221615
* Fix extra semicolon warning. NFC.Vasileios Kalintiris2014-11-101-1/+1
| | | | llvm-svn: 221613
* [mips][microMIPS] Fix issue with delay slot filler and microMIPSZoran Jovanovic2014-11-101-11/+19
| | | | | | Differential Revision: http://reviews.llvm.org/D6193 llvm-svn: 221612
* [mips] Fix sret arguments for N32/N64 which were accidentally broken in r221534.Daniel Sanders2014-11-101-0/+1
| | | | llvm-svn: 221604
* Transforms: address some late commentsSaleem Abdulrasool2014-11-082-31/+14
| | | | | | | | | | We already use the llvm namespace. Remove the unnecessary prefix. Use the StringRef::equals method to compare with C strings rather than instantiating std::strings. Addresses late review comments from David Majnemer. llvm-svn: 221564
* Transforms: sort source files in buildSaleem Abdulrasool2014-11-081-4/+4
| | | | | | Sort target sources. NFC. llvm-svn: 221563
* [Reassociate] Better preserve NSW/NUW flags.Chad Rosier2014-11-071-0/+11
| | | | | | | | Part of PR12985. Phabricator Revision: http://reviews.llvm.org/D6172 llvm-svn: 221555
* Transforms: use typedef rather than using aliasesSaleem Abdulrasool2014-11-071-26/+25
| | | | | | | | Visual Studio 2012 apparently does not support using alias declarations. Use the more traditional typedef approach. This should let the Windows buildbots pass. NFC. llvm-svn: 221554
* Transform: add SymbolRewriter passSaleem Abdulrasool2014-11-073-0/+546
| | | | | | | | | | | | | | | | This introduces the symbol rewriter. This is an IR->IR transformation that is implemented as a CodeGenPrepare pass. This allows for the transparent adjustment of the symbols during compilation. It provides a clean, simple, elegant solution for symbol inter-positioning. This technique is often used, such as in the various sanitizers and performance analysis. The control of this is via a custom YAML syntax map file that indicates source to destination mapping, so as to avoid having the compiler to know the exact details of the source to destination transformations. llvm-svn: 221548
* Fix style.Michael J. Spencer2014-11-071-2/+1
| | | | llvm-svn: 221547
* R600: Remove unused defineMatt Arsenault2014-11-071-2/+0
| | | | llvm-svn: 221543
* [mips] Promote i32 arguments to i64 for the N32/N64 ABI and fix <64-bit ↵Daniel Sanders2014-11-075-43/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | structs... Summary: ... and after all that refactoring, it's possible to distinguish softfloat floating point values from integers so this patch no longer breaks softfloat to do it. Remove direct handling of i32's in the N32/N64 ABI by promoting them to i64. This more closely reflects the ABI documentation and also fixes problems with stack arguments on big-endian targets. We now rely on signext/zeroext annotations (already generated by clang) and the Assert[SZ]ext nodes to avoid the introduction of unnecessary sign/zero extends. It was not possible to convert three tests to use signext/zeroext. These tests are bswap.ll, ctlz-v.ll, ctlz-v.ll. It's not possible to put signext on a vector type so we just accept the sign extends here for now. These tests don't pass the vectors the same way clang does (clang puts multiple elements in the same argument, these map 1 element to 1 argument) so we don't need to worry too much about it. With this patch, all known N32/N64 bugs should be fixed and we now pass the first 10,000 tests generated by ABITest.py. Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6117 llvm-svn: 221534
* [CMake] LLVMSupport: Give system_libs PRIVATE scope when LLVMSupport is ↵NAKAMURA Takumi2014-11-071-36/+31
| | | | | | | | built as SHARED. Users of LLVMSupport won't inherit ${system_libs}. unittests/SupporTests is another user of libpthreads. Apply LLVM_SYSTEM_LIBS for him explicitly. llvm-svn: 221531
* [mips] Removed the remainder of MipsCC. NFC.Daniel Sanders2014-11-072-39/+24
| | | | | | | | | | | | | | | | | Summary: One of the calls to AllocateStack (the one in LowerCall) doesn't look like it should be there but it was there before and removing it breaks the frame size calculation. Reviewers: vmedic, theraven Reviewed By: theraven Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6116 llvm-svn: 221529
* [mips] Remove MipsCC::reservedArgArea() in favour of ↵Daniel Sanders2014-11-074-18/+29
| | | | | | | | | | | | | | | | MipsABIInfo::GetCalleeAllocdArgSizeInBytes(). NFC. Summary: Reviewers: theraven, vmedic Reviewed By: vmedic Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6115 llvm-svn: 221528
* MipsCCState.h: Use LLVM_DELETED_FUNCTION for msc17.NAKAMURA Takumi2014-11-071-2/+2
| | | | llvm-svn: 221527
* [mips] Move MipsCCState to a separate file and clang-formatted it.Daniel Sanders2014-11-074-199/+260
| | | | | | | | | | | | | | Summary: Depends on D6113 Reviewers: theraven, vmedic Reviewed By: vmedic Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6114 llvm-svn: 221525
* [mips] Fix unused variable warnings introduced in r221521Daniel Sanders2014-11-071-9/+0
| | | | llvm-svn: 221522
* [mips] Remove remaining use of MipsCC::intArgRegs() in favour of ↵Daniel Sanders2014-11-074-15/+18
| | | | | | | | | | | | | | | | MipsABIInfo::GetByValArgRegs() and MipsABIInfo::GetVarArgRegs() Summary: Depends on D6112 Reviewers: theraven, vmedic Reviewed By: vmedic Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6113 llvm-svn: 221521
* [mips] Remove MipsCC::getRegVT(). NFCDaniel Sanders2014-11-072-22/+0
| | | | | | | | | | | | | | Summary: It's no longer used. Reviewers: vmedic, theraven Reviewed By: theraven Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6112 llvm-svn: 221519
* [mips] Remove MipsCC::analyzeCallOperands in favour of ↵Daniel Sanders2014-11-073-48/+39
| | | | | | | | | | | | | | | | | | CCState::AnalyzeCallOperands. NFC Summary: In addition to the usual f128 workaround, it was also necessary to provide a means of accessing ArgListEntry::IsFixed. Reviewers: theraven, vmedic Reviewed By: vmedic Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6111 llvm-svn: 221518
* [mips] Move SpecialCallingConv to MipsCCState and use it from ↵Daniel Sanders2014-11-073-46/+48
| | | | | | | | | | | | | | | | tablegen-erated code. NFC Summary: In the long run, it should probably become a calling convention in its own right but for now just move it out of MipsISelLowering::analyzeCallOperands() so that we can drop this function in favour of CCState::AnalyzeCallOperands(). Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6085 llvm-svn: 221517
* [mips] Removed IsVarArg from MipsISelLowering::analyzeCallOperands(). NFC.Daniel Sanders2014-11-072-8/+6
| | | | | | | | | | | Summary: CCState objects already carry this information in their isVarArg() method. Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6084 llvm-svn: 221516
* SCCP: overdefined calls cannot become constantDavid Majnemer2014-11-071-0/+3
| | | | | | | | | | We would attempt to fold away a call instruction which had been marked overdefined. However, it's not valid to transition to constant from overdefined. This fixes PR21512. llvm-svn: 221513
* Add Position-independent Code model Module API.Justin Hibbits2014-11-071-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This makes PIC levels a Module flag attribute, which can be queried by the backend. The flag is named `PIC Level`, and can have a value of: 0 - Backend-default 1 - Small-model (-fpic) 2 - Large-model (-fPIC) These match the `-pic-level' command line argument for clang, and the value of the preprocessor macro `__PIC__'. Test Plan: New flags tests specific for the 'PIC Level' module flag. Tests to be added as part of a future commit for PowerPC, which will use this new API. Reviewers: rafael, echristo Reviewed By: rafael, echristo Subscribers: rafael, llvm-commits Differential Revision: http://reviews.llvm.org/D5882 llvm-svn: 221510
* [AArch64] Keep flags on condition vreg when instantiating a CB branch.Ahmed Bougacha2014-11-071-1/+2
| | | | | | | | | | Reversing a CB* instruction used to drop the flags on the condition. On the included testcase, this lead to a read from an undefined vreg. Using addOperand keeps the flags, here <undef>. Differential Revision: http://reviews.llvm.org/D6159 llvm-svn: 221507
* Use a StringRefMemoryObject. NFC.Rafael Espindola2014-11-071-26/+3
| | | | llvm-svn: 221503
* LoopVectorize: Don't assume pointees are sizedDavid Majnemer2014-11-071-1/+7
| | | | | | | | | | A pointer's pointee might not be sized: the pointee could be a function. Report this as IK_NoInduction when calculating isInductionVariable. This fixes PR21508. llvm-svn: 221501
* InstCombine: Rely on cmpxchg's return code when it's strongDavid Majnemer2014-11-061-0/+16
| | | | | | | Comparing the result of a cmpxchg instruction can be replaced with an extractvalue of the cmpxchg success indicator. llvm-svn: 221498
* Remove unused variable. NFC.Rafael Espindola2014-11-061-1/+0
| | | | llvm-svn: 221497
* [ELF][yaml2obj] Handle additional MIPS specific st_other field flagsSimon Atanasyan2014-11-061-1/+37
| | | | | | | | The ELF symbol `st_other` field might contain additional flags besides visibility ones. This patch implements support for some MIPS specific flags. llvm-svn: 221491
* Factor out call to push_back. NFC.Rafael Espindola2014-11-061-3/+5
| | | | llvm-svn: 221490
* [X86][SSE] Vector integer/float conversion memory folding (cvttps2dq / ↵Simon Pilgrim2014-11-061-2/+10
| | | | | | | | | | | | cvttpd2dq) Fixed an issue with the (v)cvttps2dq and (v)cvttpd2dq instructions being incorrectly put in the 2 source operand folding tables instead of the 1 source operand and added the missing SSE/AVX versions. Also added missing (v)cvtps2dq and (v)cvtpd2dq instructions to the folding tables. Differential Revision: http://reviews.llvm.org/D6001 llvm-svn: 221489
* [X86] Add VFMADDSUB cases for the 213->231 custom inserter.Ahmed Bougacha2014-11-061-0/+9
| | | | | | Also add tests for vfmadd/vfmsub. llvm-svn: 221488
* [X86] Add missing FMA3 VFMADDSUB in the emitter.Ahmed Bougacha2014-11-061-0/+8
| | | | | | Also reuse the fma4 intrinsic test to cover fma3 instructions too. llvm-svn: 221487
* Object, COFF: Don't consider AuxFunctionDefinition for getSymbolSizeDavid Majnemer2014-11-061-10/+0
| | | | | | | mingw lies about the size of a function's AuxFunctionDefinition. Ignore the field and rely on our heuristic to determine the symbol's size. llvm-svn: 221485
* Base check on the section name, not the variable name.Rafael Espindola2014-11-061-10/+5
| | | | | | | | The variable is private, so the name should not be relied on. Also, the linker uses the sections, so asan should too when trying to avoid causing the linker problems. llvm-svn: 221480
* [RegAlloc] Kill off the trivial spiller - nobody is using it any more.Lang Hames2014-11-064-189/+5
| | | | llvm-svn: 221474
* Indentation fixesMichael Liao2014-11-061-38/+38
| | | | llvm-svn: 221472
* Try to appease MSVC buildbots after r221466.Frederic Riss2014-11-061-1/+1
| | | | llvm-svn: 221471
* Change DIBuilder::createImportedDeclaration from taking a DIScope to a ↵Frederic Riss2014-11-061-2/+5
| | | | | | | | | | DIDescriptor. Imported declarations can be DIGlobalVariables which aren't a DIScope. Today clang (unknowingly I believe) shoehorns these into a DIScope and it all works just because we never access the fields. llvm-svn: 221466
* [Hexagon] Adding basic Hexagon ELF object emitter.Colin LeMahieu2014-11-065-4/+182
| | | | llvm-svn: 221465
* Clean up NVPTXLowerStructArgs.cpp. NFCEli Bendersky2014-11-061-54/+37
| | | | | | | | | * Remove unnecessary const_casts and C-style casts * Simplify attribute access code * Simplify ArrayRef creation * 80-col and clang-format llvm-svn: 221464
OpenPOWER on IntegriCloud