summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Move the armv8.1-a ras test to a negative with noras test as ras isEric Christopher2016-09-192-5/+5
| | | | | | included in armv8.1-a by default and so we weren't testing anything. llvm-svn: 281941
* BitcodeWriter: fix emission of invoke when calling a var-arg function with ↵Mehdi Amini2016-09-192-1/+19
| | | | | | operand bundles llvm-svn: 281940
* Misleading comments of SplitBlockAndInsertIfThenElse in BasicBlockUtils.hEvgeniy Stepanov2016-09-191-2/+2
| | | | | | | | | | | The comments of SplitBlockAndInsertIfThenElse say the SplitBefore instruction will stay in the old block. But according to the implementation(split the block at SplitBefore by using splitBasicBlock), the SplitBefore will be moved to the new block. This patch fixes the comments. Patch by Zhe Yu Wu. llvm-svn: 281939
* [scudo] Modify Scudo to use its own Secondary AllocatorKostya Kortchinsky2016-09-193-2/+195
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: The Sanitizer Secondary Allocator was not entirely ideal was Scudo for several reasons: decent amount of unneeded code, redundant checks already performed by the front end, unneeded data structures, difficulty to properly protect the secondary chunks header. Given that the second allocator is pretty straight forward, Scudo will use its own, trimming all the unneeded code off of the Sanitizer one. A significant difference in terms of security is that now each secondary chunk is preceded and followed by a guard page, thus mitigating overflows into and from the chunk. A test was added as well to illustrate the overflow & underflow situations into the guard pages. Reviewers: kcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D24737 llvm-svn: 281938
* [X86][SSE] Updated vector abs testsSimon Pilgrim2016-09-191-80/+167
| | | | | | Renamed and added v2i64 / v4i64 tests llvm-svn: 281937
* Fix signatures of fallback tow(upper|lower)_l.Dan Albert2016-09-191-2/+2
| | | | | | | | | | | | | | Summary: These functions take and return wint_t, not int: http://pubs.opengroup.org/onlinepubs/9699919799/functions/towupper.html Reviewers: mclow.lists, EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D24743 llvm-svn: 281936
* Add missing dependency to change-namespace.Eric Liu2016-09-192-0/+2
| | | | llvm-svn: 281935
* [analyzer] Calculate extent size for memory regions allocated by new expression.Gabor Horvath2016-09-193-12/+207
| | | | | | | | | | | ArrayBoundChecker did not detect out of bounds memory access errors in case an array was allocated by the new expression. This patch resolves this issue. Patch by Daniel Krupp! Differential Revision: https://reviews.llvm.org/D24307 llvm-svn: 281934
* [libFuzzer] use sleep() instead of std::this_thread::sleep_for to avoid ↵Kostya Serebryany2016-09-191-1/+1
| | | | | | coverage from instrumented libc++ llvm-svn: 281933
* Use FileCheck variables. NFC.Rafael Espindola2016-09-191-3/+3
| | | | llvm-svn: 281932
* Map .data.rel.ro correctly.Rafael Espindola2016-09-192-7/+10
| | | | | | | An input section named .data.rel.ro now maps to an output section named .data.rel.ro. Before we were mapping it to .data. llvm-svn: 281931
* Make this test a bit stricter.Rafael Espindola2016-09-191-17/+32
| | | | | | | By making every section on byte and checking the size it now shows how many sections were concatenated into each output section. llvm-svn: 281930
* Don't CHECK the addresses. NFCRafael Espindola2016-09-191-13/+13
| | | | | | | That is not what this test is about. This reduces changes in another patch that changes layout. llvm-svn: 281929
* Handle early inline for hot callsites that reside in the same basic block.Dehao Chen2016-09-193-4/+9
| | | | | | | | | | | | Summary: Callsites in the same basic block should share the same hotness. This patch checks for the hottest callsite in the same basic block, and use the hotness for all callsites in that basic block for early inline decisions. It also fixes the test to add "-S" so theat the "CHECK-NOT" is actually checking the content. Reviewers: dnovillo Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D24734 llvm-svn: 281927
* Fix compilation of unit tests.Zachary Turner2016-09-191-33/+33
| | | | llvm-svn: 281926
* [libc++] Fix extern template visibility for WindowsShoaib Meenai2016-09-195-56/+85
| | | | | | | | | | On Windows, marking an `extern template class` declaration as exported actually forces an instantiation, which is not the desired behavior. Instead, the actual explicit instantiations need to be exported. Differential Revision: https://reviews.llvm.org/D24679 llvm-svn: 281925
* Reorder initializers in CallStackFrame so that we don't get a warning.Samuel Antao2016-09-191-2/+2
| | | | llvm-svn: 281923
* Try to fix freebsd and android builds.Zachary Turner2016-09-192-2/+2
| | | | llvm-svn: 281922
* Replace __ANDROID__ with __BIONIC__.Dan Albert2016-09-193-9/+14
| | | | | | | | | | | | | | | Summary: None of these checks are specific to Android devices. If libc++ was used with Bionic on a normal Linux system these checks would still be needed. Reviewers: mclow.lists, EricWF Subscribers: compnerd, tberghammer, danalbert, srhines, cfe-commits Differential Revision: https://reviews.llvm.org/D24690 llvm-svn: 281921
* Trying to fix name conflict in change-namespace tool.Eric Liu2016-09-192-6/+6
| | | | llvm-svn: 281920
* Fix more functions in Args to use StringRef.Zachary Turner2016-09-1934-151/+194
| | | | | | | | | | | | | | | This patch also marks the const char* versions as =delete to prevent their use. This has the potential to cause build breakages on some platforms which I can't compile. I have tested on Windows, Linux, and OSX. Best practices for fixing broken callsites are outlined in Args.h in a comment above the deleted function declarations. Eventually we can remove these =delete declarations, but for now they are important to make sure that all implicit conversions from const char * are manually audited to make sure that they do not invoke a conversion from nullptr. llvm-svn: 281919
* A clang tool for changing surrouding namespaces of class/function definitions.Eric Liu2016-09-1911-0/+1075
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: A tool for changing surrouding namespaces of class/function definitions while keeping references to types in the changed namespace correctly qualified by prepending namespace specifiers before them. Example: test.cc namespace na { class X {}; namespace nb { class Y { X x; }; } // namespace nb } // namespace na To move the definition of class Y from namespace "na::nb" to "x::y", run: clang-change-namespace --old_namespace "na::nb" \ --new_namespace "x::y" --file_pattern "test.cc" test.cc -- Output: namespace na { class X {}; } // namespace na namespace x { namespace y { class Y { na::X x; }; } // namespace y } // namespace x Reviewers: alexfh, omtcyfz, hokein Subscribers: mgorny, klimek, djasper, beanz, alexshap, Eugene.Zelenko, cfe-commits Differential Revision: https://reviews.llvm.org/D24183 llvm-svn: 281918
* [Writer] Rename variables to reflect reality. NFCI.Davide Italiano2016-09-191-13/+13
| | | | | | | | | | The InputSection variables in the Writer were named `C`. This was because when the ELF linker was ported (from COFF) the name `Chunks` for input sections was retained. Luckily we switched to a more ELF-compliant jargon, but these variables weren't reanamed accordingly during the transition. llvm-svn: 281917
* [RegisterBankInfo] Avoid heap allocation in most cases.Quentin Colombet2016-09-192-2/+3
| | | | | | | | | | | The OperandsMapper class is used heavy in RegBankSelect and each instantiation triggered a heap allocation for the array of operands. Instead, use a SmallVector with a big enough size such that most of the cases do not have to use dynamically allocated memory. This improves the compile time of the RegBankSelect pass. llvm-svn: 281916
* [OpenCL] Allow half type kernel argument when cl_khr_fp16 is enabledYaxun Liu2016-09-193-6/+22
| | | | llvm-svn: 281915
* LiveRangeCalc: Fix reporting of invalid vreg usage in liveness calculationMatthias Braun2016-09-192-3/+34
| | | | | | | | | | | | | Machine programs need a definition of each vreg before reaching a use (the definition may come from an IMPLICIT_DEF instruction). This class of errors is not detected by the MachineVerifier because of efficiency concerns. LiveRangeCalc used to report these problems, make it do that again (followup to r279625). Also use report_fatal_error() instead of llvm_unreachable() as the error reporting is only present in asserts build anyway. llvm-svn: 281914
* Xcode: support gtests that use the Inputs dirTodd Fiala2016-09-192-79/+125
| | | | | | | | | | | | | | | | This change adds support for the gtests that require input data in the Inputs files. This is done through a new Xcode script phase that runs the scripts/Xcode/prepare-gtest-run-dir.sh script. That script simply copies the contents of all unittests/**/Inputs dirs into ${TARGET_BUILD_DIR}/Inputs before running the test. This change also renames the Xcode 'gtest-for-debugging' to 'gtest-build', and makes the gtest "build and run" target depend on gtest-build. This reduces replication within the targets. gtest .c/.cpp files now should only be added to the gtest-build target. llvm-svn: 281913
* Only set branch weight during sample pgo annotation when max_weight of the ↵Dehao Chen2016-09-192-19/+20
| | | | | | | | | | | | | | branch is non-zero. Otherwise use default static profile to set branch probability. Summary: It does not make sense to set equal weights for all unkown branches as we have static branch prediction available. Reviewers: dnovillo Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D24732 llvm-svn: 281912
* Use call target count to derive the call instruction weightDehao Chen2016-09-193-4/+21
| | | | | | | | | | | | Summary: The call target count profile is directly derived from LBR branch->target data. This is more reliable than instruction frequency profiles that could be moved across basic block boundaries. This patches uses call target count profile to annotate call instructions. Reviewers: davidxl, dnovillo Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D24410 llvm-svn: 281911
* Remove InstructionCombining and its related pass from sample pgo passes as ↵Dehao Chen2016-09-192-16/+0
| | | | | | | | | | | | | | we can handle "invoke" correctly. Summary: We previously relies on InstructionCombining pass to remove invoke instructions. Now that we can inline invoke instructions correctly, we do not need these passes any more. Reviewers: dnovillo Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D24730 llvm-svn: 281910
* [compiler-rt] Add support for the dynamic shadow allocationEtienne Bergeron2016-09-198-32/+63
| | | | | | | | | | | | | | | | | | | | | | Summary: This patch is adding the needed code to compiler-rt to support dynamic shadow. This is to support this patch: https://reviews.llvm.org/D23354 It's adding support for using a shadow placed at a dynamic address determined at runtime. The dynamic shadow is required to work on windows 64-bits. Reviewers: rnk, kcc, vitalybuka Subscribers: kubabrecka, dberris, llvm-commits, chrisha Differential Revision: https://reviews.llvm.org/D23363 llvm-svn: 281909
* [asan] Support dynamic shadow address instrumentationEtienne Bergeron2016-09-192-7/+81
| | | | | | | | | | | | | | | | | | | Summary: This patch is adding the support for a shadow memory with dynamically allocated address range. The compiler-rt needs to export a symbol containing the shadow memory range. This is required to support ASAN on windows 64-bits. Reviewers: kcc, rnk, vitalybuka Subscribers: kubabrecka, dberris, llvm-commits, chrisha Differential Revision: https://reviews.llvm.org/D23354 llvm-svn: 281908
* Remove excessive padding from the struct CallStackFrameAlexander Shaposhnikov2016-09-191-6/+6
| | | | | | | | | | | The struct CallStackFrame is in lib/AST/ExprConstant.cpp inside anonymous namespace. This diff reorders the fields and removes excessive padding. Test plan: make -j8 check-clang Differential revision: https://reviews.llvm.org/D23901 llvm-svn: 281907
* [Support] Add StringRef::withNullAsEmpty()Zachary Turner2016-09-191-0/+4
| | | | | | | | | | | When porting large bodies of code from using const char* to StringRef, it is helpful to be able to treat nullptr as an empty string, since that it is often what it is used to indicate in C-style code. Differential Revision: https://reviews.llvm.org/D24697 llvm-svn: 281906
* Revert r281841, it does not work on Windows (PR30443).Nico Weber2016-09-191-722/+0
| | | | llvm-svn: 281905
* [OpenCL] Diagnose assignment to dereference of half type pointerYaxun Liu2016-09-193-3/+18
| | | | | | Differential Revision: https://reviews.llvm.org/D24626 llvm-svn: 281904
* [AMDGPU] Refactor VOPC instruction TD definitionsValery Pykhtin2016-09-196-648/+1118
| | | | | | Differential Revision: https://reviews.llvm.org/D24546 llvm-svn: 281903
* [sanitizer] rename __sanitizer_symbolize_data to ↵Kostya Serebryany2016-09-194-6/+6
| | | | | | __sanitizer_symbolize_global (to avoid conflict with another definition) llvm-svn: 281902
* Remove unnecessary const_canst. NFC.Rafael Espindola2016-09-191-9/+3
| | | | llvm-svn: 281901
* [ELF] - LinkerScript: Add workaround for gcc 6.2.0 failure w/autoGeorge Rimar2016-09-191-2/+2
| | | | | | | | | Will Dietz found and reported that lld does not compile with gcc 6.2.0, more details https://llvm.org/bugs/show_bug.cgi?id=30438 And confirmed this change fixes the issue. llvm-svn: 281900
* Reverting r281714 due to causing an assert when calling builtins that expect ↵Neil Hickey2016-09-194-44/+5
| | | | | | a double, from CL llvm-svn: 281899
* [AArch64] Fix encoding for lsl #12 in add/sub immediatesDiana Picus2016-09-194-12/+27
| | | | | | | | | | | Whenever an add/sub immediate needs a fixup, we set that immediate field to zero, which is correct, but we also set the shift bits to zero, which is not true for instructions that use lsl #12. This patch makes sure that if lsl #12 was used, it will appear in the encoding of the instruction. Differential Revision: https://reviews.llvm.org/D23930 llvm-svn: 281898
* Fix spelling in CMakeListsTobias Grosser2016-09-191-1/+1
| | | | llvm-svn: 281897
* [AMDGPU] Fix s_branch with -1 offsetSam Kolton2016-09-192-5/+9
| | | | | | | | | | | | | | | | | | | Summary: In case s_branch instruction target is itself backend should emit offset -1 but instead it emit 0. ''' label: s_branch label // should emit [0xff,0xff,0x82,0xbf] ''' Tom, Matt: why are we adjusting fixup values in applyFixup() method instead of processFixup()? processFixup() is calling adjustFixupValue() but does nothing with its result. Reviewers: vpykhtin, artem.tamazov, tstellarAMD Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl Differential Revision: https://reviews.llvm.org/D24671 llvm-svn: 281896
* Add @llvm.dbg.value entries for the phi node created by -mem2regKeith Walker2016-09-194-0/+134
| | | | | | | | | | | | | | | | | | | | | | | When phi nodes are created in the -mem2reg phase, the @llvm.dbg.declare entries are converted to @llvm.dbg.value entries at the place where the store instructions existed. However no entry is created to describe the resulting value of the phi node. The effect of this is especially noticeable in for loops which have a constant for the intial value; the loop control variable's location would be described as the intial constant value in the loop body once the -mem2reg optimization phase was run. This change adds the creation of the @llvm.dbg.value entries to describe variables whose location is the result of a phi node created in -mem2reg. Also when the phi node is finally lowered to a machine instruction it is important that the lowered "load" instruction is placed before the associated DEBUG_VALUE entry describing the value loaded. Differential Revision: https://reviews.llvm.org/D23715 llvm-svn: 281895
* [Thumb] Set correct initial mapping symbol for big-endian thumbOliver Stannard2016-09-192-1/+11
| | | | | | | | | | The initial mapping symbol state is set from the triple, but we only checked for the little-endian thumb triple, so could end up with an ARM mapping symbol for big-endian thumb. Differential Revision: https://reviews.llvm.org/D24553 llvm-svn: 281894
* ARM: check alignment before transforming ldr -> ldm (or similar).Tim Northover2016-09-193-8/+41
| | | | | | | | | ldm and stm instructions always require 4-byte alignment on the pointer, but we weren't checking this before trying to reduce code-size by replacing a post-indexed load/store with them. Unfortunately, we were also dropping this incormation in DAG ISel too, but that's easy enough to fix. llvm-svn: 281893
* [X86 Codegen Test] Divided masked_memop into several files. NFC.Elena Demikhovsky2016-09-193-9370/+436
| | | | | | The masked_memop.ll became huge. I extracted AVX-512 specific tests into separate files. llvm-svn: 281892
* Recommit r281457 "Supports adding insertion around non-insertion replacements".Eric Liu2016-09-193-24/+128
| | | | | | | | | | | | | | Summary: Diff to r281457: - added a test case `CalculateRangesOfInsertionAroundReplacement`. Reviewers: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D24606 llvm-svn: 281891
* [SimplifyCFG] Update (AND) IR flags when CSE'ing instructionsJames Molloy2016-09-192-2/+60
| | | | | | | | We were updating metadata but not IR flags. Because we pick an arbitrary instruction to be the CSE candidate, it comes down to luck (50% or less chance) if this results in broken codegen or not, which is why PR30373 which is actually not the fault of the commit it was bisected down to. Fixes PR30373. llvm-svn: 281889
OpenPOWER on IntegriCloud