summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [x86] fix variable names; NFCSanjay Patel2016-09-201-22/+23
| | | | llvm-svn: 281953
* [sanitizer-coverage] add comdat to coverage guards if neededKostya Serebryany2016-09-202-0/+15
| | | | llvm-svn: 281952
* Remove a use of std::list.Rui Ueyama2016-09-201-4/+10
| | | | llvm-svn: 281951
* [x86] auto-generate checksSanjay Patel2016-09-191-12/+18
| | | | llvm-svn: 281950
* [LCSSA] Cache LoopExits to avoid wasted workPhilip Reames2016-09-191-3/+9
| | | | | | | | | | When looking at the scribus_1.3 example from https://llvm.org/bugs/show_bug.cgi?id=10584, I noticed that we were spending a large amount of time computing loop exits in LCSSA. This code appears to be written with the assumption that LoopExits are stored in the Loop and thus cheap to query. This is not true, so we should cache the result across the potentially long running loop which tends to visit a small handful of Loops. On the particular example from 10584, this change drops the time spent in LCSSA computation by about 80%. Differential Revision: https://reviews.llvm.org/D24509 llvm-svn: 281949
* [RegisterBankInfo] Adapt call to std::fill due to use of SmallVector.Quentin Colombet2016-09-191-1/+1
| | | | | | This was meant to be commited with my previous commit. llvm-svn: 281948
* Merge branch 'ADCE5'David Callahan2016-09-191-2/+39
| | | | llvm-svn: 281947
* [GC] Don't crash when printing the special Discarded GC section.Davide Italiano2016-09-192-1/+7
| | | | | | | | | | InputSection<ELFT>::Discarded has no name and it's not backed by a file. Trying to report it as discared will cause a nullptr dereference, therefore a crash. Skip it. Differential Revision: https://reviews.llvm.org/D24731 llvm-svn: 281946
* [Kaleidoscope] Make Chapter 2 use llvm::make_unique, rather than a helper.Lang Hames2016-09-192-22/+15
| | | | | | | This essentially reverts r251936, minimizing the difference between Chapter2 and Chapter 3, and making Chapter 2's code match the tutorial text. llvm-svn: 281945
* [x86] use getSignBit() to simplify code; NFCISanjay Patel2016-09-191-4/+3
| | | | llvm-svn: 281944
* Fixed the build by changing a couple of const char *s to StringRefs.Sean Callanan2016-09-193-7/+10
| | | | llvm-svn: 281943
* Convert 3 more functions to use a StringRef.Zachary Turner2016-09-197-92/+65
| | | | | | | | This converts Args::Unshift, Args::AddOrReplaceEnvironmentVariable, and Args::ContainsEnvironmentVariable to use StringRefs. The code is also simplified somewhat as a result. llvm-svn: 281942
* 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
OpenPOWER on IntegriCloud