summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Factor out duplicated code building a MemberExpr and marking itRichard Smith2019-06-064-44/+70
| | | | | | | | referenced. This reinstates r362563, reverted in r362597. llvm-svn: 362757
* Convert MemberExpr creation and serialization to work the same way asRichard Smith2019-06-0611-181/+218
| | | | | | | | | | most / all other Expr subclasses. This reinstates r362551, reverted in r362597, with a fix to a bug that caused MemberExprs to sometimes have a null FoundDecl after a round-trip through an AST file. llvm-svn: 362756
* Revert [ELF] Simplify the condition to create .interpJordan Rupprecht2019-06-062-8/+11
| | | | | | | | This reverts r362355 (git commit c78c999a9cd7a77b9d13c610c9faebac5d560a55) This causes some internal tests to fail; details provided offthread. llvm-svn: 362755
* AMDGPU: Insert skip branches over return blocksMatt Arsenault2019-06-063-3/+198
| | | | | | | | | | SIInsertSkips really doesn't understand the control flow, and makes very stupid assumptions about the block layout. This was able to get away with not skipping return blocks, since usually after structurization there is only one placed at the end of the function. Tail duplication can break this assumption. llvm-svn: 362754
* [NFC] Test commit, whitespace changeDavid Tenty2019-06-061-1/+1
| | | | | | As per the Developer Policy, upon obtaining commit access. llvm-svn: 362753
* [NFC][CodeGen] Add unary fneg tests to X86/fma4-intrinsics-x86.llCameron McInally2019-06-061-0/+221
| | | | llvm-svn: 362752
* [DebugInfo] Incorrect debug info record generated for loop counter.Alexey Lapshin2019-06-064-24/+176
| | | | | | | | | | | | | Incorrect Debug Variable Range was calculated while "COMPUTING LIVE DEBUG VARIABLES" stage. Range for Debug Variable("i") computed according to current state of instructions inside of basic block. But Register Allocator creates new instructions which were not taken into account when Live Debug Variables computed. In the result DBG_VALUE instruction for the "i" variable was put after these newly inserted instructions. This is incorrect. Debug Value for the loop counter should be inserted before any loop instruction. Differential Revision: https://reviews.llvm.org/D62650 llvm-svn: 362750
* [AMDGPU] Partial revert for the ba447bae7448435c9986eece0811da1423972fddAlexander Timofeev2019-06-0637-342/+272
| | | | | | | | | | | | "Divergence driven ISel. Assign register class for cross block values according to the divergence." that discovered the design flaw leading to several issues that required to be solved before. This change reverts AMDGPU specific changes and keeps common part unaffected. llvm-svn: 362749
* [NFC][CodeGen] Add unary fneg tests to X86/fma-intrinsics-x86.llCameron McInally2019-06-061-0/+896
| | | | llvm-svn: 362748
* [X86] Make a bunch of merge masked binops commutable for loading folding.Craig Topper2019-06-063-66/+2488
| | | | | | | | | | | | | This primarily affects add/fadd/mul/fmul/and/or/xor/pmuludq/pmuldq/max/min/fmaxc/fminc/pmaddwd/pavg. We already commuted the unmasked and zero masked versions. I've added 512-bit stack folding tests for most of the instructions affected. I've tested needing commuting and not commuting across unmasked, merged masked, and zero masked. The 128/256 bit instructions should behave similarly. llvm-svn: 362746
* Add cdb test for global constantsAmy Huang2019-06-061-0/+33
| | | | | | | | | | | | | | Summary: This creates an integration test for global constants Reviewers: rnk Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62974 llvm-svn: 362745
* Revert "Revert "[ELF] Suppress "STT_SECTION symbol should be defined" on ↵Sean Fertile2019-06-065-62/+53
| | | | | | | | .eh_frame, .debug*, .zdebug* and .gcc_except_table"" This reverts commit f49f58527a6d8147524d8d6f2eb1feb70f856292. llvm-svn: 362744
* Revert "Revert "Reland D61583 [ELF] Error on relocations to STT_SECTION ↵Sean Fertile2019-06-0610-12/+100
| | | | | | | | | | symbols if the sections were discarded"" This reverts commit 729111cf1824159bb4dd331cab8a829eab30313f. Reverting the previous commit breaks other LLD buildbots. llvm-svn: 362743
* [InstSimplify] add tests for fcmp with known-never-nan operands; NFCSanjay Patel2019-06-061-2/+46
| | | | llvm-svn: 362742
* [NFC][CodeGen] Add unary fneg tests to X86/fma-scalar-combine.llCameron McInally2019-06-061-3/+97
| | | | llvm-svn: 362741
* clang-format: better handle namespace macrosFrancois Ferrand2019-06-0612-50/+531
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Other macros are used to declare namespaces, and should thus be handled similarly. This is the case for crpcut's TESTSUITE macro, or for unittest-cpp's SUITE macro: TESTSUITE(Foo) { TEST(MyFirstTest) { assert(0); } } // TESTSUITE(Foo) This patch deals with this cases by introducing a new option to specify lists of namespace macros. Internally, it re-uses the system already in place for foreach and statement macros, to ensure there is no impact on performance. Reviewers: krasimir, djasper, klimek Reviewed By: klimek Subscribers: acoomans, cfe-commits, klimek Tags: #clang Differential Revision: https://reviews.llvm.org/D37813 llvm-svn: 362740
* Revert "Reland D61583 [ELF] Error on relocations to STT_SECTION symbols if ↵Sean Fertile2019-06-0610-100/+12
| | | | | | | | | | the sections were discarded" This reverts commit 5d3b3188f722456a6470c7effcacf17656406429. Breaks the PowerPC multi-stage buildbot. llvm-svn: 362739
* Revert "[ELF] Suppress "STT_SECTION symbol should be defined" on .eh_frame, ↵Sean Fertile2019-06-065-53/+62
| | | | | | | | | | | .debug*, .zdebug* and .gcc_except_table" This reverts commit dcba4828a9ead5f5b1fa27f0853823618075d0e0. This commit builds on dcba4828a9ead5f5b1fa27f0853823618075d0e0 which breaks the multi-staged PowerPC buildbot. llvm-svn: 362738
* [CFLGraph] Add support for unary fneg instruction.Craig Topper2019-06-062-1/+12
| | | | | | Differential Revision: https://reviews.llvm.org/D62791 llvm-svn: 362737
* [LV] Wrap LV illegality reporting in a function. NFC.Renato Golin2019-06-062-112/+128
| | | | | | | | | | | | | | | | | | | | | | | A function for loop vectorization illegality reporting has been introduced: void LoopVectorizationLegality::reportVectorizationFailure( const StringRef DebugMsg, const StringRef OREMsg, const StringRef ORETag, Instruction * const I) const; The function prints a debug message when the debug for the compilation unit is enabled as well as invokes the optimization report emitter to generate a message with a specified tag. The function doesn't cover any complicated logic when a custom lambda should be passed to the emitter, only generating a message with a tag is supported. The function always prints the instruction `I` after the debug message whenever the instruction is specified, otherwise the debug message ends with a dot: 'LV: Not vectorizing: Disabled/already vectorized.' Patch by Pavel Samolysov <samolisov@gmail.com> llvm-svn: 362736
* [AIX] Implement function descriptor on SDAGJason Liu2019-06-0611-41/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: (1) Function descriptor on AIX On AIX, a called routine may have 2 distinct symbols associated with it: * A function descriptor (Name) * A function entry point (.Name) The descriptor structure on AIX is the same as those in the ELF V1 ABI: * The address of the entry point of the function. * The TOC base address for the function. * The environment pointer. The descriptor symbol uses the same name as the source level function in C. The function entry point is analogous to the symbol we would generate for a function in a non-descriptor-based ABI, except that it is renamed by prepending a ".". Which symbol gets referenced depends on the context: * Taking the address of the function references the descriptor symbol. * Calling the function references the entry point symbol. (2) Speaking of implementation on AIX, for direct function call target, we create proper MCSymbol SDNode(e.g . ".foo") while constructing SDAG to replace original TargetGlobalAddress SDNode. Then down the path, we can take advantage of this MCSymbol. Patch by: Xiangling_L Reviewed by: sfertile, hubert.reinterpretcast, jasonliu, syzaara Differential Revision: https://reviews.llvm.org/D62532 llvm-svn: 362735
* [NFC][CodeGen] Add unary fneg tests to X86/fma4-fneg-combine.llCameron McInally2019-06-061-0/+105
| | | | llvm-svn: 362733
* [InlineCost] Add support for unary fneg.Craig Topper2019-06-062-0/+54
| | | | | | | | | | This adds support for unary fneg based on the implementation of BinaryOperator without the soft float FP cost. Previously we would just delegate to visitUnaryInstruction. I think the only real change is that we will pass the FastMath flags to SimplifyFNeg now. Differential Revision: https://reviews.llvm.org/D62699 llvm-svn: 362732
* [clang][HeaderSearch] Consider all path separators equalKadir Cetinkaya2019-06-062-0/+12
| | | | | | | | | | | | Reviewers: ilya-biryukov, sammccall Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62965 llvm-svn: 362731
* [NFC][CodeGen] Add unary fneg tests to X86/fma_patterns.llCameron McInally2019-06-061-0/+304
| | | | llvm-svn: 362730
* Fixing ppc tests: sed -i 's/# REQUIES: ppc/# REQUIRES: ppc/g'Puyan Lotfi2019-06-063-3/+3
| | | | llvm-svn: 362728
* [LoopPred] Fix a bug in unconditional latch bailout introduced in r362284Philip Reames2019-06-062-2/+28
| | | | | | This is a really silly bug that even a simple test w/an unconditional latch would have caught. I tried to guard against the case, but put it in the wrong if check. Oops. llvm-svn: 362727
* [ScheduleTreeTransform] Silence compiler warning. NFC.Michael Kruse2019-06-061-1/+1
| | | | | | | Use size_t for position which is the return type type ArrayRef::size() it is compared to. llvm-svn: 362724
* [DAGCombine] MergeConsecutiveStores - improve non-temporal load\store ↵Simon Pilgrim2019-06-062-34/+62
| | | | | | | | | | | | | | handling (PR42123) This patch is the first step towards ensuring MergeConsecutiveStores correctly handles non-temporal loads\stores: 1 - When merging load\stores we must ensure that they all have the same non-temporal flag. This is unlikely to occur, but can in strange cases where we're storing at the end of one page and the beginning of another. 2 - The merged load\store node must retain the non-temporal flag. Differential Revision: https://reviews.llvm.org/D62910 llvm-svn: 362723
* [PPC32] Support GD/LD/IE/LE TLS models and their relaxationsFangrui Song2019-06-068-4/+462
| | | | | | | | Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D62940 llvm-svn: 362722
* [PPC32] Improve the 32-bit PowerPC portFangrui Song2019-06-0626-329/+934
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many -static/-no-pie/-shared/-pie applications linked against glibc or musl should work with this patch. This also helps FreeBSD PowerPC64 to migrate their lib32 (PR40888). * Fix default image base and max page size. * Support new-style Secure PLT (see below). Old-style BSS PLT is not implemented, so it is not suitable for FreeBSD rtld now because it doesn't support Secure PLT yet. * Support more initial relocation types: R_PPC_ADDR32, R_PPC_REL16*, R_PPC_LOCAL24PC, R_PPC_PLTREL24, and R_PPC_GOT16. The addend of R_PPC_PLTREL24 is special: it decides the call stub PLT type but it should be ignored for the computation of target symbol VA. * Support GNU ifunc * Support .glink used for lazy PLT resolution in glibc * Add a new thunk type: PPC32PltCallStub that is similar to PPC64PltCallStub. It is used by R_PPC_REL24 and R_PPC_PLTREL24. A PLT stub used in -fPIE/-fPIC usually loads an address relative to .got2+0x8000 (-fpie/-fpic code uses _GLOBAL_OFFSET_TABLE_ relative addresses). Two .got2 sections in two object files have different addresses, thus a PLT stub can't be shared by two object files. To handle this incompatibility, change the parameters of Thunk::isCompatibleWith to `const InputSection &, const Relocation &`. PowerPC psABI specified an old-style .plt (BSS PLT) that is both writable and executable. Linkers don't make separate RW- and RWE segments, which causes all initially writable memory (think .data) executable. This is a big security concern so a new PLT scheme (secure PLT) was developed to address the security issue. TLS will be implemented in D62940. glibc older than ~2012 requires .rela.dyn to include .rela.plt, it can not handle the DT_RELA+DT_RELASZ == DT_JMPREL case correctly. A hack (not included in this patch) in LinkerScript.cpp addOrphanSections() to work around the issue: if (Config->EMachine == EM_PPC) { // Older glibc assumes .rela.dyn includes .rela.plt Add(In.RelaDyn); if (In.RelaPlt->isLive() && !In.RelaPlt->Parent) In.RelaDyn->getParent()->addSection(In.RelaPlt); } Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D62464 llvm-svn: 362721
* [NFC][CodeGen] Add unary fneg tests to X86/fma_patterns_wide.llCameron McInally2019-06-061-0/+219
| | | | llvm-svn: 362720
* gn build: Merge r362685Nico Weber2019-06-061-0/+1
| | | | llvm-svn: 362719
* Remove unused PPC.h includes under llvm/lib/Target/PowerPC.Dmitri Gribenko2019-06-063-4/+1
| | | | llvm-svn: 362718
* [X86] Make masked floating point equality/ordered compares commutable for ↵Craig Topper2019-06-063-7/+73
| | | | | | | | load folding purposes. Same as what is supported for the unmasked form. llvm-svn: 362717
* [Profile]: Add runtime interface to specify file handle for profile data ↵Xinliang David Li2019-06-062-0/+74
| | | | | | | | | | | | (Part-II) Test cases Author: Sajjad Mirza Differential Revision: http://reviews.llvm.org/D62541 llvm-svn: 362716
* [NFC][CodeGen] Add unary fneg tests to fmul-combines.ll fnabs.llCameron McInally2019-06-062-0/+129
| | | | llvm-svn: 362715
* [PowerPC] Add R_PPC_IRELATIVEFangrui Song2019-06-061-0/+1
| | | | | | This will be used by lld's powerpc port. llvm-svn: 362713
* [NFC][CodeGen] Add unary fneg tests to fp-fast.ll fp-fold.ll ↵Cameron McInally2019-06-066-1/+85
| | | | | | fp-in-intregs.ll fp-stack-compare-cmov.ll fp-stack-compare.ll fsxor-alignment.ll llvm-svn: 362712
* [DA] Add an option to control delinearization validity checksWhitney Tsang2019-06-061-10/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Dependence Analysis performs static checks to confirm validity of delinearization. These checks often fail for 64-bit targets due to type conversions and integer wrapping that prevent simplification of the SCEV expressions. These checks would also fail at compile-time if the lower bound of the loops are compile-time unknown. For example: void foo(int n, int m, int a[][m]) { for (int i = 0; i < n; ++i) for (int j = 0; j < m; ++j) { a[i][j] = a[i+1][j-2]; } } opt -mem2reg -instcombine -indvars -loop-simplify -loop-rotate -inline -pass-remarks=.* -debug-pass=Arguments -da-permissive-validity-checks=false k3.ll -analyze -da will produce the following by default: da analyze - anti [* *|<]! but will produce the following expected dependence vector if the validity checks are disabled: da analyze - consistent anti [1 -2]! This revision will introduce a debug option that will leave the validity checks in place by default, but allow them to be turned off. New tests are added for cases where it cannot be proven at compile-time that the individual subscripts stay in-bound with respect to a particular dimension of an array. These tests enable the option to provide user guarantee that the subscripts do not over/under-flow into other dimensions, thereby producing more accurate dependence vectors. For prior discussion on this topic, leading to this change, please see the following thread: http://lists.llvm.org/pipermail/llvm-dev/2019-May/132372.html Reviewers: Meinersbur, jdoerfert, kbarton, dmgreen, fhahn Reviewed By: Meinersbur, jdoerfert, dmgreen Subscribers: fhahn, hiraditya, javed.absar, llvm-commits, Whitney, etiotto Tag: LLVM Differential Revision: https://reviews.llvm.org/D62610 llvm-svn: 362711
* [NFC][CodeGen] Remove duplicate test in fp-fast.llCameron McInally2019-06-061-11/+0
| | | | | | @test10 is the same as @test11. llvm-svn: 362710
* gn build: Add new tidy checks to gn filesIlya Biryukov2019-06-061-0/+2
| | | | | | The checks were added in r362673 and r362672. llvm-svn: 362709
* [AIX] Implement call lowering with parameters could pass onto GPRsJason Liu2019-06-064-19/+286
| | | | | | | | | | | | Summary: This patch implements SDAG call lowering on AIX for functions which only have parameters that could fit into GPRs. Reviewers: hubert.reinterpretcast, syzaara Differential Revision: https://reviews.llvm.org/D62823 llvm-svn: 362708
* [LibTooling] Add insert/remove convenience functions for creating `ASTEdit`s.Yitzhak Mandelbaum2019-06-062-0/+75
| | | | | | | | | | | | | | Summary: `change()` is an all purpose function; the revision adds simple shortcuts for the specific operations of inserting (before/after) or removing source. Reviewers: ilya-biryukov Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62621 llvm-svn: 362707
* [clang-tidy] Another attempt to fix misc-redundant-expression check.Haojian Wu2019-06-061-5/+6
| | | | | | Correct the fix of rL3627011, the isValueDependent guard was added in a wrong place in rL362701. llvm-svn: 362706
* FileCheck [6/12]: Introduce numeric variable definitionThomas Preud'homme2019-06-068-337/+706
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch is part of a patch series to add support for FileCheck numeric expressions. This specific patch introduces support for defining numeric variable in a CHECK directive. This commit introduces support for defining numeric variable from a litteral value in the input text. Numeric expressions can then use the variable provided it is on a later line. Copyright: - Linaro (changes up to diff 183612 of revision D55940) - GraphCore (changes in later versions of revision D55940 and in new revision created off D55940) Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield Tags: #llvm Differential Revision: https://reviews.llvm.org/D60386 llvm-svn: 362705
* [llvm-ar] Create thin archives with MRI scriptsOwen Reynolds2019-06-062-1/+28
| | | | | | | | This patch implements the "CREATE_THIN" MRI script command, allowing thin archives to be created via MRI scripts. Differential Revision: https://reviews.llvm.org/D62919 llvm-svn: 362704
* [InstCombine] add tests for loads of bitcasted vector pointer; NFCSanjay Patel2019-06-061-0/+90
| | | | llvm-svn: 362703
* [clang-tidy] Make the plugin honor NOLINTNikolai Kosjar2019-06-066-18/+211
| | | | | | | | | | | | | | | | | Instantiate a ClangTidyDiagnosticConsumer also for the plugin case and let it forward the diagnostics to the external diagnostic engine that is already in place. One minor difference to the clang-tidy executable case is that the compiler checks/diagnostics are referred to with their original name. For example, for -Wunused-variable the plugin will refer to the check as "-Wunused-variable" while the clang-tidy executable will refer to that as "clang-diagnostic- unused-variable". This is because the compiler diagnostics never reach ClangTidyDiagnosticConsumer. Differential Revision: https://reviews.llvm.org/D61487 llvm-svn: 362702
* [clang-tidy] Fix an assertion failure in misc-redundant-expression.Haojian Wu2019-06-062-1/+13
| | | | | | | | | | | | | | | | | Summary: The assertion "isIntegerConstantExpr" is triggered in the isIntegerConstantExpr(), we should not call it if the expression is value dependent. Reviewers: gribozavr Subscribers: xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62947 llvm-svn: 362701
OpenPOWER on IntegriCloud