summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [cfi] Get rid of a fixed size buffer for the library path in test.Evgeniy Stepanov2016-01-281-3/+4
| | | | llvm-svn: 259082
* Include RecordDecls from anonymous unions in the AST.Nico Weber2016-01-288-34/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For void f() { union { int i; }; } clang used to omit the RecordDecl from the anonymous union from the AST. That's because the code creating it only called PushOnScopeChains(), which adds it to the current DeclContext, which here is the function's DeclContext. But RecursiveASTVisitor doesn't descent into all decls in a FunctionDecl. Instead, for DeclContexts that contain statements, return the RecordDecl so that it can be included in the DeclStmt containing the VarDecl for the union. Interesting bits from the AST before this change: |-FunctionDecl | `-CompoundStmt | |-DeclStmt | | `-VarDecl 0x589cd60 <col:3> col:3 implicit used 'union (anonymous at test.cc:3:3)' callinit After this change: -FunctionDecl | `-CompoundStmt | |-DeclStmt | | |-CXXRecordDecl 0x4612e48 <col:3, col:18> col:3 union definition | | | |-FieldDecl 0x4612f70 <col:11, col:15> col:15 referenced i 'int' | | `-VarDecl 0x4613010 <col:3> col:3 implicit used 'union (anonymous at test.cc:3:3)' callinit This is now closer to how anonymous struct and unions are represented as members of structs. It also enabled deleting some one-off code in the template instantiation code. Finally, it fixes a crash with ASTMatchers, see the included test case (this fixes http://crbug.com/580749). llvm-svn: 259079
* Fix an issue where the type <formatter> list command would not accept a ↵Enrico Granata2016-01-282-1/+27
| | | | | | | | valid argument and instead error out complaining about a malformed regex rdar://problem/24380025 llvm-svn: 259078
* Remove unused parameter.Nico Weber2016-01-281-9/+6
| | | | llvm-svn: 259077
* [SplitModule] In split module utility we should never separate alias with ↵Sergei Larin2016-01-283-0/+92
| | | | | | | | | | | | its aliasee. Summary: When splitting module with preserving locals, we currently do not handle case of global alias being separated with its aliasee. Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16585 llvm-svn: 259075
* Address buildbot fallout from r259065David Majnemer2016-01-283-10/+13
| | | | llvm-svn: 259074
* Class Property: class property and instance property can have the same name.Manman Ren2016-01-2816-61/+154
| | | | | | | | | | | | | | | | | | | Add "enum ObjCPropertyQueryKind" to a few APIs that used to only take the name of the property: ObjCPropertyDecl::findPropertyDecl, ObjCContainerDecl::FindPropertyDeclaration, ObjCInterfaceDecl::FindPropertyVisibleInPrimaryClass, ObjCImplDecl::FindPropertyImplDecl, and Sema::ActOnPropertyImplDecl. ObjCPropertyQueryKind currently has 3 values: OBJC_PR_query_unknown, OBJC_PR_query_instance, OBJC_PR_query_class This extra parameter specifies that we are looking for an instance property with the given name, or a class property with the given name, or any property with the given name (if both exist, the instance property will be returned). rdar://23891898 llvm-svn: 259070
* ELF: Rename error -> fatal and redefine error as a non-noreturn function.Rui Ueyama2016-01-2814-115/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In many situations, we don't want to exit at the first error even in the process model. For example, it is better to report all undefined symbols rather than reporting the first one that the linker picked up randomly. In order to handle such errors, we don't need to wrap everything with ErrorOr (thanks for David Blaikie for pointing this out!) Instead, we can set a flag to record the fact that we found an error and keep it going until it reaches a reasonable checkpoint. This idea should be applicable to other places. For example, we can ignore broken relocations and check for errors after visiting all relocs. In this patch, I rename error to fatal, and introduce another version of error which doesn't call exit. That function instead sets HasError to true. Once HasError becomes true, it stays true, so that we know that there was an error if it is true. I think introducing a non-noreturn error reporting function is by itself a good idea, and it looks to me that this also provides a gradual path towards lld-as-a-library (or at least embed-lld-to-your-program) without sacrificing code readability with lots of ErrorOr's. http://reviews.llvm.org/D16641 llvm-svn: 259069
* Minor cleanup /NFCXinliang David Li2016-01-282-4/+1
| | | | llvm-svn: 259068
* [PGO] test case cleanupsXinliang David Li2016-01-284-15/+21
| | | | | | | 1. Make test case more focused and robust by focusing on what to be tested (linkage, icall) -- make it easier to validate 2. Testing linkages of data and counter variables instead of names. Counters and data are more relavant to be tested. llvm-svn: 259067
* [X86] Don't transform X << 1 to X + X during type legalizationDavid Majnemer2016-01-283-13/+22
| | | | | | | | | | | | | | | | | | | | While legalizing a 64-bit shift left by 1, the following occurs: We split the shift operand in half: a high half and a low half. We then create an ADDC with the low half and a ADDE with the high half + the carry bit from the ADDC. This is problematic if X is any_ext'd because the high half computation is now undef + undef + carry bit and there is no way to ensure that the two undef values had the same bitwise representation. This results in the lowest bit in the high half turning into garbage. Instead, do not try to turn shifts into arithmetic during type legalization. This fixes PR26350. llvm-svn: 259065
* Fix strange indent.Nico Weber2016-01-281-2/+2
| | | | llvm-svn: 259063
* [PlaceSafepoints] Clean up tests; NFCSanjoy Das2016-01-2810-11/+11
| | | | | | | Use `opt < %s` instead of `opt %s` as specified in http://llvm.org/docs/TestingGuide.html#fragile-tests. llvm-svn: 259062
* [Coverage] Use a set to track visited FileIDs (NFC)Vedant Kumar2016-01-281-3/+3
| | | | llvm-svn: 259061
* Make header self-contained.Benjamin Kramer2016-01-281-0/+1
| | | | llvm-svn: 259060
* AMDGPU: waitcnt operand fixesTom Stellard2016-01-284-13/+16
| | | | | | | | | | | | | | | | Summary: Allow lgkmcnt up to 0xF (hardware allows that). Fix mask for ExpCnt in AMDGPUInstPrinter. Reviewers: tstellarAMD, arsenm Subscribers: arsenm Differential Revision: http://reviews.llvm.org/D16314 Patch by: Nikolay Haustov llvm-svn: 259059
* [X86] Test commit, fixed typos in comments. NFC.Mitch Bodart2016-01-281-2/+2
| | | | llvm-svn: 259057
* [Renderscript] Clang-format the renderscript plugin.Aidan Dodds2016-01-282-754/+819
| | | | | | Run clang-format over the renderscript plugin and fix common formatting deviations. llvm-svn: 259056
* [PlaceSafepoints] Minor test cleanup; NFCSanjoy Das2016-01-281-10/+10
| | | | | | | There is no need to place quotes around some_call and personality_function. llvm-svn: 259055
* AMDGPU: Move subtarget specific code out of AMDGPUInstrInfo.cppTom Stellard2016-01-286-322/+81
| | | | | | | | | | | | | | Summary: Also delete all the stub functions that are identical to the implementations in TargetInstrInfo.cpp. Reviewers: arsenm Subscribers: arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D16609 llvm-svn: 259054
* [LICM] Keep metadata on control equivalent hoistsSanjoy Das2016-01-282-7/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: If the instruction we're hoisting out of a loop into its preheader is guaranteed to have executed in the loop, then the metadata associated with the instruction (e.g. !range or !dereferenceable) is valid in the preheader. This is because once we're in the preheader, we know we're eventually going to reach the location the metadata was valid at. This change makes LICM smarter around this, and helps it recognize cases like these: ``` do { int a = *ptr; !range !0 ... } while (i++ < N); ``` to ``` int a = *ptr; !range !0 do { ... } while (i++ < N); ``` Earlier we'd drop the `!range` metadata after hoisting the load from `ptr`. Reviewers: igor-laevsky Subscribers: mcrosier, llvm-commits Differential Revision: http://reviews.llvm.org/D16669 llvm-svn: 259053
* [AArch64] Set MMOs on pre- and post-index instructions.Chad Rosier2016-01-281-2/+4
| | | | | | | Without the MMOs the MI scheduler is unable to reason about the dependencies of these instructions. llvm-svn: 259052
* [x86] Merge multiple calls to DAG.getTargetLoweringInfo(). NFC.Simon Pilgrim2016-01-281-4/+4
| | | | llvm-svn: 259050
* Improve efficiency of handling unmapped subprogram metadataTeresa Johnson2016-01-281-25/+28
| | | | | | | | | | | | | | | | The stripNullSubprograms function is very inefficient because it walks all subprograms in all compile units in the dest module any time a new module is linked in. For LTO in particular this will get increasingly expensive as more modules are linked. This patch improves the efficiency in several ways. The first is that no scanning is necessary when there were no unneeded subprograms identified in the first place. The second is that only the newly-linked module's compile unit metadata should be examined. Fixes PR26346. llvm-svn: 259049
* [libcxx] Work around for clang calling GAS after having already failed.Daniel Sanders2016-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | Summary: This is a workaround to a clang bug which causes libcxx tests to fail in the 3.8 release. The clang bug is currently being investigated. It seems that clang does not stop after frontend errors when using -verify and -fno-integrated-as (or when this is the default). This patch adds -fsyntax-only to prevent GAS from being called, fixing the libcxx failures. PR26277 Patch by Eric Fiselier Reviewers: mclow.lists, hans, EricWF Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D16584 llvm-svn: 259046
* Revert r259035, it introduces a cyclic library dependencyOliver Stannard2016-01-2822-167/+246
| | | | llvm-svn: 259045
* AVX512: Fix truncate v32i8 to v32i1 lowering implementation.Igor Breger2016-01-289-185/+245
| | | | | | | | Enable truncate 128/256bit packed byte/word with AVX512BW but without AVX512VL, use 512bit instructions. Differential Revision: http://reviews.llvm.org/D16531 llvm-svn: 259044
* Revert r259036, it introduces a cyclic library dependencyOliver Stannard2016-01-285-118/+17
| | | | llvm-svn: 259043
* Fix const cast error for MSVC2015 build.Aidan Dodds2016-01-281-1/+1
| | | | | | | | | The Visual Studio 2015 build was failing with the following error: error C2440: 'initializing': cannot convert from 'const char [12]' to 'char *' This should fix the problem by initializing a non const char array, instead of taking a pointer to const static data. llvm-svn: 259042
* Remove autotools build systemMichael Kruse2016-01-2820-7588/+7
| | | | | | | | | | | The autotools build system is based on and requires LLVM's autotools build system to work, which has been depricated and finally removed in r258861. Consequently we also remove the autotools build system from Polly. Differential Revision: http://reviews.llvm.org/D16655 llvm-svn: 259041
* Unbreak the wasm backend again after r259035.Benjamin Kramer2016-01-281-1/+1
| | | | llvm-svn: 259040
* [mips][microMIPS] Disable FastISel for microMIPSZoran Jovanovic2016-01-283-9/+4
| | | | | | | | | | | Author: milena.vujosevic.janicic Reviewers: dsanders FastIsel is not supported for microMIPS, thus it needs to be disabled. Test micromips-zero-mat-uses.ll is deleted since the tested sequence of instructions is not generated for microMIPS without FastISel. Differential Revision: http://reviews.llvm.org/D15892 llvm-svn: 259039
* [OMPT] Add support for ompt_event_task_dependences and ↵Jonas Hahnfeld2016-01-286-11/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ompt_event_task_dependence_pair The attached patch adds support for ompt_event_task_dependences and ompt_event_task_dependence_pair events from the OMPT specification [1]. These events only apply to OpenMP 4.0 and 4.1 (aka 4.5) because task dependencies were introduced in 4.0. With respect to the changes: ompt_event_task_dependences According to the specification, this event is raised after the task has been created, thefore this event needs to be raised after ompt_event_task_begin (in __kmp_task_start). However, the dependencies are known at __kmpc_omp_task_with_deps which occurs before __kmp_task_start. My modifications extend the ompt_task_info_t struct in order to store the dependencies of the task when _kmpc_omp_task_with_deps occurs and then they are emitted in __kmp_task_start just after raising the ompt_event_task_begin. The deps field is allocated and valid until the event is raised and it is freed and set to null afterwards. ompt_event_task_dependence_pair The processing of the dependences (i.e. checking whenever a dependence is already satisfied) is done within __kmp_process_deps. That function checks every dependence and calls the __kmp_track_dependence routine which gives some support for graphical output. I used that routine to emit the dependence pair but I also needed to know the sink_task. Despite the fact that the code within KMP_SUPPORT_GRAPH_OUTPUT refers to task_sink it may be null because sink->dn.task (there's a comment regarding this) and in fact it does not point to a proper pointer value because the value is set in node->dn.task = task; after the __kmp_process_deps calls in __kmp_check_deps. I have extended the __kmp_process_deps and __kmp_track_dependence parameter list to receive the sink_task. [1] https://github.com/OpenMPToolsInterface/OMPT-Technical-Report/blob/target/ompt-tr.pdf Patch by Harald Servat Differential Revision: http://reviews.llvm.org/D14746 llvm-svn: 259038
* [OMPT] Avoid SEGV when a worker thread needs its parallel id behind the barrierJonas Hahnfeld2016-01-281-1/+4
| | | | | | | | | | When the code behind the barrier is executed, the master thread may have already resumed execution. That's why we cannot safely assume that *pteam is not yet freed. This has been introduced by r258866. llvm-svn: 259037
* Add backend dignostic printer for unsupported featuresOliver Stannard2016-01-285-17/+118
| | | | | | | | | | | | | | | | | | Re-commit of r258950 after fixing layering violation. Add backend dignostic printer for unsupported features The related LLVM patch adds a backend diagnostic type for reporting unsupported features, this adds a printer for them to clang. In the case where debug location information is not available, I've changed the printer to report the location as the first line of the function, rather than the closing brace, as the latter does not give the user any information. This also affects optimisation remarks. Differential Revision: http://reviews.llvm.org/D16591 llvm-svn: 259036
* Add backend dignostic printer for unsupported featuresOliver Stannard2016-01-2822-245/+166
| | | | | | | | | | | | | | | | Re-commit of r258951 after fixing layering violation. The related LLVM patch adds a backend diagnostic type for reporting unsupported features, this adds a printer for them to clang. In the case where debug location information is not available, I've changed the printer to report the location as the first line of the function, rather than the closing brace, as the latter does not give the user any information. This also affects optimisation remarks. Differential Revision: http://reviews.llvm.org/D16590 llvm-svn: 259035
* [X86][SSE] Move setTargetShuffleZeroElements closer to getTargetShuffleMask. ↵Simon Pilgrim2016-01-281-46/+47
| | | | | | | | NFCI. Keep target shuffle mask helper functions closer together. llvm-svn: 259034
* Minor code cleanups. NFC.Junmo Park2016-01-281-1/+1
| | | | llvm-svn: 259033
* Fix isBeforeInTranslationUnit to not abort on macros defined in cmdline.Yury Gribov2016-01-281-0/+8
| | | | | | Differential Revision: http://reviews.llvm.org/D15804 llvm-svn: 259031
* Small refactor in isBeforeInTranslationUnit.Yury Gribov2016-01-281-6/+6
| | | | | | Differential Revision: http://reviews.llvm.org/D15804 llvm-svn: 259030
* [X86][AVX512] small fix in ptestm intrinsicsAsaf Badouh2016-01-284-17/+24
| | | | | | | | move ptestm{q|d} intrinsics from patterns form (in td file) to the intrinsics table Differential Revision: http://reviews.llvm.org/D16633 llvm-svn: 259029
* fixed Xcode gtest build failureTodd Fiala2016-01-281-4/+4
| | | | llvm-svn: 259028
* modify Xcode build to use cmake/ninja for internal llvm/clangTodd Fiala2016-01-286-420/+495
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change restores the Xcode build to working after Makefile support was stripped from LLVM and clang recently. With this change, the Xcode build now requires cmake (2.8.12.2+). The cmake must either be on the path that Xcode sees, or it must exist in one of the following locations: * /usr/local/bin/cmake * /opt/local/bin/cmake * $HOME/bin/cmake If the ninja build tool is present on the path, it will be used. If not, ninja will be cloned (via git), bootstrap-built, and used for the llvm/clang build. LLDB now requires a minimum deployment target of OS X 10.9. Prior to this, it was 10.8. The llvm/clang cmake build will not run with Xcode 7.2 or Xcode 7.3 beta's compiler with the minimum deployment target set to anything lower than 10.9. This is related to #include <atomic>. When llvm or clang source code does not exist in the lldb tree, it will be cloned via git using http://llvm.org/git/{project}.git. Previously it used SVN. If this causes any heartache, we can make this smarter, autodetect an embedded svn and use svn instead. (And/or use SVN if a git command is not available). This change also fixes an lldb-mi linkage failure (needed libncurses) as exposed by one of the LLVM libs. llvm-svn: 259027
* [OMPT] Workaround clang failing with 'declare target'Jonas Hahnfeld2016-01-283-6/+9
| | | | | | | | | | Current clang trunk reports _OPENMP to be 201307 = OpenMP 4.0. It doesn't recognize '#pragma omp declare target' though (patch still pending) and therefore fails compilation. Differential Revision: http://reviews.llvm.org/D16631 llvm-svn: 259026
* ValueTracking: Use fixed array for assumption exclude set in Query.Matthias Braun2016-01-281-15/+27
| | | | | | | | | | | | The Query structure is constructed often and is relevant for compiletime performance. We can replace the SmallPtrSet for assumption exclusions in this structure with a fixed size array because we know the maximum number of elements. This improves typical clang -O3 -emit-llvm compiletime by 1.2% in my measurements. Differential Revision: http://reviews.llvm.org/D16204 llvm-svn: 259025
* [DAGCombiner] Don't add volatile or indexed stores to ChainedStoresJunmo Park2016-01-282-0/+47
| | | | | | | | | | | | Summary: findBetterNeighborChains does not handle volatile or indexed stores. However, it did not check when adding stores to ChainedStores. Reviewers: arsenm Differential Revision: http://reviews.llvm.org/D16463 llvm-svn: 259024
* [libcxx] Remove pragmas that were needed to suppress warnings producedAkira Hatanaka2016-01-282-27/+0
| | | | | | | | | by -Wpadded. We don't need these pragmas anymore because -Wpadded was removed from buildit in r258900. llvm-svn: 259023
* [Lex] Share some common code between decimal and octal parsing in ↵Craig Topper2016-01-282-61/+48
| | | | | | | | NumericLiteralParser. There were a couple slight variations between the two copies that I don't believe were intentional. For example, only one of the paths checked for digit separations proceeding a '.', but I think the lexer itself splits the token if a digit separator proceeds a period. llvm-svn: 259022
* SmallPtrSet: Add missing includeMatthias Braun2016-01-281-0/+1
| | | | llvm-svn: 259021
* WebAssembly: fix buildJF Bastien2016-01-281-1/+1
| | | | | | r259016 didn't also revert r258957 which broken the WebAssembly build. llvm-svn: 259020
OpenPOWER on IntegriCloud