summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [TargetRegisterInfo] Introduce a helper class, BitMaskClassIterator, toQuentin Colombet2016-04-071-0/+92
| | | | | | | | | | iterate over register class bitmask. Thanks to this helper class, it would not require for each user of the register classes bitmask to actually know how they are represents. Moreover, it will make the code much easier to read. llvm-svn: 265730
* Rename parameter I to Index for WriteCombinedGlobalValueSummary() (NFC)Mehdi Amini2016-04-071-4/+4
| | | | | From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 265729
* Replace Sema-level implementation of -fassume-sane-operator-new with aRichard Smith2016-04-0725-99/+103
| | | | | | | | | | | | | | CodeGen-level implementation. Instead of adding an attribute to clang's FunctionDecl, add the IR attribute directly. This means a module built with this flag is now compatible with code built without it and vice versa. This change also results in the 'noalias' attribute no longer being added to calls to operator new in the IR; it's now only added to the declaration. It also fixes a bug where we failed to add the attribute to the 'nothrow' versions (because we didn't implicitly declare them, there was no good time to inject a fake attribute). llvm-svn: 265728
* [RegBankSelect] Reuse RegisterBankInfo logic to get to the register bankQuentin Colombet2016-04-072-12/+6
| | | | | | | | | from a register. On top of duplicating the logic, it was buggy! It would assert on physical registers, since MachineRegisterInfo does not have any information regarding register classes/banks for them. llvm-svn: 265727
* Do not select EhPad BB in MachineBlockPlacement when there is regular BB to ↵Amaury Sechet2016-04-076-75/+170
| | | | | | | | | | | | | | | | | schedule Summary: EHPad BB are not entered the classic way and therefor do not need to be placed after their predecessors. This patch make sure EHPad BB are not chosen amongst successors to form chains, and are selected as last resort when selecting the best candidate. EHPad are scheduled in reverse probability order in order to have them flow into each others naturally. Reviewers: chandlerc, majnemer, rafael, MatzeB, escha, silvas Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D17625 llvm-svn: 265726
* [AArch64] Get rid of some GlobalISel ifdefs.Quentin Colombet2016-04-071-3/+1
| | | | llvm-svn: 265725
* Sort options.Rui Ueyama2016-04-071-3/+3
| | | | llvm-svn: 265724
* ELF: Define -S as an alias for --strip-debug.Rui Ueyama2016-04-072-0/+3
| | | | llvm-svn: 265723
* ELF: Add --strip-debug option.Rui Ueyama2016-04-075-3/+41
| | | | | | | If --strip-debug option is given, then all sections whose names start with ".debug" are removed from output. llvm-svn: 265722
* [TargetRegisterInfo] Fix the comment of SuperRegClassIterator::getMask.Quentin Colombet2016-04-071-1/+2
| | | | llvm-svn: 265721
* [AArch64] gcc does not like litteral without quotes even on preprocessor macros.Quentin Colombet2016-04-071-1/+1
| | | | llvm-svn: 265720
* [AArch64][CallLowering] Do not build the API if GlobalISel is not built.Quentin Colombet2016-04-072-14/+5
| | | | | | | This gets rid of some ifdefs and dummy implementations that were here just to fill the blanks. llvm-svn: 265719
* [modules] Allow differences in flags that only affect preprocessor predefinesRichard Smith2016-04-073-17/+50
| | | | | | | (and __has_feature checks) between explicitly-specified module files and the current compilation. llvm-svn: 265718
* ELF: Add --no-gnu-unique option.Rui Ueyama2016-04-075-10/+30
| | | | | | | When the option is specified, then all STB_GNU_UNIQUE symbols are converted to STB_GLOBAL symbols. llvm-svn: 265717
* [GlobalISel] Add RegBankSelect hooks into the pass pipeline.Quentin Colombet2016-04-073-0/+23
| | | | | | | Now, RegBankSelect will happen after the IRTranslation and the target may optionally add additional passes in between. llvm-svn: 265716
* [sanitizer] Fix sem_init_glibc.cc test on __HAVE_64B_ATOMIC arches.Evgeniy Stepanov2016-04-071-4/+15
| | | | | | | | | | | | | | | | | | | | | glibc can use one of 2 layouts for semaphores: architectures that don't HAVE_64B_ATOMIC use an uint32_t field with semaphore value, then a private field, then a waiting thread count field - this is the layout currently assumed by the test. However, HAVE_64B_ATOMIC arches use a fused uint64_t field that contains the value in low bits and waiting thread count in high bits, followed by a private field. This resulted in taking private field from the wrong offset on 64-bit atomic platforms (the test still passed, but didn't actually test the private field). On big-endian platforms, this resulted in a fail, since the first 4 bytes overlay the thread count field, and not the value field. Found while porting ASan to s390x. Patch by Marcin Kościelnicki. llvm-svn: 265715
* [sancov] updaing android test after enabling cc edge pruningMike Aizatsky2016-04-071-1/+1
| | | | llvm-svn: 265714
* [AMDGPU] Implement get_local_size for amdgcn--amdhsa tripleKonstantin Zhuravlyov2016-04-075-1/+41
| | | | | | Differential Revision: http://reviews.llvm.org/D18284 llvm-svn: 265713
* [ObjC kindof] Use type bound to filter out the candidate methods.Manman Ren2016-04-074-11/+61
| | | | | | rdar://21306753 llvm-svn: 265712
* NFC: simplify code in BuildInstanceMessage.Manman Ren2016-04-074-69/+112
| | | | | | | | | | | | | | | | Instead of searching the global pool multiple times: in LookupFactoryMethodInGlobalPool, LookupInstanceMethodInGlobalPool, CollectMultipleMethodsInGlobalPool, and AreMultipleMethodsInGlobalPool, we now collect the method candidates in CollectMultipleMethodsInGlobalPool only, and other functions will use the collected method set. This commit adds parameter "Methods" to AreMultipleMethodsInGlobalPool, and SelectBestMethod. It also changes the implementation of CollectMultipleMethodsInGlobalPool to collect the desired kind first, if none is found, to collect the other kind. This avoids the need to call both LookupFactoryMethodInGlobalPool and LookupInstanceMethodInGlobalPool. llvm-svn: 265711
* ELF: Implement --start-lib and --end-libRui Ueyama2016-04-0713-19/+231
| | | | | | | | | | | | | | | | start-lib and end-lib are options to link object files in the same semantics as archive files. If an object is in start-lib and end-lib, the object is linked only when the file is needed to resolve undefined symbols. That means, if an object is in start-lib and end-lib, it behaves as if it were in an archive file. In this patch, I introduced a new notion, LazyObjectFile. That is analogous to Archive file type, but that works for a single object file instead of for an archive file. http://reviews.llvm.org/D18814 llvm-svn: 265710
* AMDGPU/SI: Implement atomic load/store for i32 and i64Jan Vesely2016-04-076-24/+289
| | | | | | | | | | Standard load/store instructions with GLC bit set. Reviewers: tstellardAMD, arsenm Differential Revision: http://reviews.llvm.org/D18760 llvm-svn: 265709
* AMDGPU/SI: Add latency for export instructionsTom Stellard2016-04-072-5/+5
| | | | | | | | | | Reviewers: arsenm, nhaehnle Subscribers: nhaehnle, arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D18599 llvm-svn: 265708
* [RegBankSelect] Initial implementation for non-optimized output.Quentin Colombet2016-04-072-19/+154
| | | | | | | | The pass walk through the machine function and assign the register banks using the default mapping. In other words, there is no attempt to reduce cross register copies. llvm-svn: 265707
* Recommit r263036 with additional inlining, so that it will continue to work ↵Marshall Clow2016-04-072-4/+47
| | | | | | with existing system dylibs. Implements LWG#2583 llvm-svn: 265706
* [sanitizer] Add early call handling to strlen interceptorDerek Bruening2016-04-071-0/+6
| | | | | | | | | | | | | | | | Summary: The strlen interceptor is sometimes invoked too early for REAL(strlen) to be initialized. A special check is added to use internal_strlen for this situation. Reviewers: dim Subscribers: llvm-commits, samsonov Differential Revision: http://reviews.llvm.org/D18851 Change-Id: I3acc58f4abbae1904f25324abd84efea67aad0a2 llvm-svn: 265705
* [RegisterBankInfo] Add more details on the expectation ofQuentin Colombet2016-04-071-0/+5
| | | | | | getInstrMapping. llvm-svn: 265704
* [RegisterBankInfo] Provide a target independent helper function to guessQuentin Colombet2016-04-072-41/+144
| | | | | | | | | | | | | the mapping of an instruction on register bank. For most instructions, it is possible to guess the mapping of the instruciton by using the encoding constraints. It remains instructions without encoding constraints. For copy-like instructions, we try to propagate the information we get from the other operands. Otherwise, the target has to give this information. llvm-svn: 265703
* Basic: move CodeGenOptions from FrontendSaleem Abdulrasool2016-04-0735-43/+54
| | | | | | | | This is a mechanical move of CodeGenOptions from libFrontend to libBasic. This fixes the layering violation introduced earlier by threading CodeGenOptions into TargetInfo. It should also fix the modules based self-hosting builds. NFC. llvm-svn: 265702
* [RegisterBankInfo] Change the signature of getSizeInBits to factor outQuentin Colombet2016-04-072-14/+24
| | | | | | the access to MRI and TRI. llvm-svn: 265701
* Minor Wdocumentation fix. NFCI.Simon Pilgrim2016-04-071-1/+1
| | | | llvm-svn: 265700
* [RegisterBankInfo] Provide a default constructor for InstructionMappingQuentin Colombet2016-04-072-0/+18
| | | | | | | | | helper class. The default constructor creates invalid (isValid() == false) instances and may be used to communicate that a mapping was not found. llvm-svn: 265699
* Mention readability-static-definition-in-anonymous-namespace in release notes.Eugene Zelenko2016-04-071-1/+6
| | | | | | | | Consistency in using ` and ``. Differential revision: http://reviews.llvm.org/D18797 llvm-svn: 265698
* [X86][SSE] Added bitmask pattern shuffle testsSimon Pilgrim2016-04-072-0/+195
| | | | | | Based on OR(AND(MASK,V0),AND(~MASK,V1)) style patterns llvm-svn: 265697
* [MachineRegisterInfo] Track register bank for virtual registers.Quentin Colombet2016-04-072-4/+63
| | | | | | | | | | | | | | | | | | | | A virtual register may have either a register bank or a register class. This is represented by a PointerUnion between the related classes. Typically, a virtual register went through the following states regarding register class and register bank: 1. Creation: None is set. Virtual registers are fully generic. 2. Register bank assignment: Register bank is set. Virtual registers live into a register bank, but we do not know the constraints they need to fulfil. 3. Instruction selection: Register class is set. Virtual registers are bound by encoding constraints. To map these states to GlobalISel, the IRTranslator implements #1, RegBankSelect #2, and Select #3. llvm-svn: 265696
* [RegisterBank] Rename RegisterBank::contains into RegisterBank::covers.Quentin Colombet2016-04-074-13/+13
| | | | llvm-svn: 265695
* [PPC] Added a note to release notesEhsan Amiri2016-04-071-1/+1
| | | | | | | A draft line added to release notes for PPC, to keep a record of changes. This is just a draft and will be rewritten towards the end of release. llvm-svn: 265694
* [SystemZ] Fix build break from r265689Ulrich Weigand2016-04-071-2/+1
| | | | | | | Fix build error seen on some build bots due to: error: default label in switch which covers all enumeration values llvm-svn: 265693
* [sancov] updaing android testMike Aizatsky2016-04-071-1/+1
| | | | llvm-svn: 265692
* [clang-tidy] add new checker for string literal with NUL character.Etienne Bergeron2016-04-078-0/+252
| | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds the support for detecting suspicious string literals and their //incorrect// usage. The following example shows a incorrect character escaping leading to an embedded NUL character. ``` std::string str = "\0x42"; // Should be "\x42". ``` The patch also add detection of truncated literal when a literal is passed to a string constructor. Reviewers: hokein, alexfh Subscribers: LegalizeAdulthood, bcraig, Eugene.Zelenko, bkramer, cfe-commits Differential Revision: http://reviews.llvm.org/D18783 llvm-svn: 265691
* [X86]: Fix for PR27251.Kevin B. Smith2016-04-072-5/+22
| | | | | | Differential Revision: http://reviews.llvm.org/D18850 llvm-svn: 265690
* [SystemZ] Implement conditional returnsUlrich Weigand2016-04-0779-813/+1023
| | | | | | | | | | | | | | | | | | Return is now considered a predicable instruction, and is converted to a newly-added CondReturn (which maps to BCR to %r14) instruction by the if conversion pass. Also, fused compare-and-branch transform knows about conditional returns, emitting the proper fused instructions for them. This transform triggers on a *lot* of tests, hence the huge diffstat. The changes are mostly jX to br %r14 -> bXr %r14. Author: koriakin Differential Revision: http://reviews.llvm.org/D17339 llvm-svn: 265689
* [IR/Verifier] Merge two ifs into one. NFC.Davide Italiano2016-04-071-3/+1
| | | | llvm-svn: 265688
* [GVN] Address review comments for D18662Ulrich Weigand2016-04-071-9/+10
| | | | | | | | | | | As suggested by Chandler in his review comments for D18662, this follow-on patch renames some variables in GetLoadValueForLoad and CoerceAvailableValueToLoadType to hopefully make it more obvious which variables hold value sizes and which hold load/store sizes. No functional change intended. llvm-svn: 265687
* Fix an use after free.Rafael Espindola2016-04-071-1/+3
| | | | | | | Thanks to asan for pointing it out that OutputSections was being resized. llvm-svn: 265686
* NFC: disallow comparison of AtomicOrderingJF Bastien2016-04-071-0/+5
| | | | | | Follow-up to D18775 and related clang change. AtomicOrdering is a lattice, 'stronger' is the right thing to do, direct comparison is fraught with peril. llvm-svn: 265685
* [GVN] Fix handling of sub-byte types in big-endian modeUlrich Weigand2016-04-072-3/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | When GVN wants to re-interpret an already available value in a smaller type, it needs to right-shift the value on big-endian systems to ensure the correct bytes are accessed. The shift value is the difference of the sizes of the two types. This is correct as long as both types occupy multiples of full bytes. However, when one of them is a sub-byte type like i1, this no longer holds true: we still need to shift, but only to access the correct *byte*. Accessing bits within the byte requires no shift in either endianness; e.g. an i1 resides in the least-significant bit of its containing byte on both big- and little-endian systems. Therefore, the appropriate shift value to be used is the difference of the *storage* sizes of the two types. This is already handled correctly in one place where such a shift takes place (GetStoreValueForLoad), but is incorrect in two other places: GetLoadValueForLoad and CoerceAvailableValueToLoadType. This patch changes both places to use the storage size as well. Differential Revision: http://reviews.llvm.org/D18662 llvm-svn: 265684
* [PPC] Enable transformations in PPCPassConfig::addIRPasses at O2Ehsan Amiri2016-04-0730-346/+172
| | | | | | | | | | | | | | http://reviews.llvm.org/D18562 A large number of testcases has been modified so they pass after this test. One testcase is deleted, because I realized even after undoing the original change that was committed with this testcase, the testcase still passes. So I removed it. The change to one other testcase (test/CodeGen/PowerPC/pr25802.ll) is an arbitrary change to keep it passing. Given the original intention of the testcase, and the fact that fixing it will require some time to change the testcase, we concluded that this quick change will be enough. llvm-svn: 265683
* Simplify dynamic relocation creation.Rafael Espindola2016-04-075-59/+55
| | | | | | | The position of a relocation can always be expressed as an offset in an output section. llvm-svn: 265682
* [clang-tidy] fix a crash with -fdelayed-template-parsing in ↵Etienne Bergeron2016-04-072-0/+175
| | | | | | | | | | | | | | | | | | | | | | | UnnecessaryValueParamCheck. Summary: This is the same kind of bug than [[ http://reviews.llvm.org/D18238 | D18238 ]]. Fix crashes caused by deferencing null pointer when declarations parsing may be delayed. The body of the declarations may be null. The crashes were observed with a Windows build of clang-tidy and the following command-line. ``` command-line switches: -fms-compatibility-version=19 -fms-compatibility ``` Reviewers: alexfh Subscribers: kimgr, LegalizeAdulthood, cfe-commits Differential Revision: http://reviews.llvm.org/D18852 llvm-svn: 265681
OpenPOWER on IntegriCloud