summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Use llvm::to_string instead of std::to_string to fix botTeresa Johnson2016-09-231-2/+3
| | | | | | | This should fix the android build in this bot: http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-buildserver/builds/11143 llvm-svn: 282308
* Combine two StringSwitch::Cases because Cases now can take 6 parameters.Rui Ueyama2016-09-231-2/+1
| | | | llvm-svn: 282307
* Change FileAction::GetPath() to return a StringRef.Zachary Turner2016-09-235-31/+22
| | | | llvm-svn: 282306
* Add StringSwitch::Cases functions that takes 6 to 10 arguments.Rui Ueyama2016-09-231-41/+61
| | | | | | Differential Revision: https://reviews.llvm.org/D24882 llvm-svn: 282305
* Revert "[profile] Hide lprofCurFilename"Vedant Kumar2016-09-231-2/+1
| | | | | | | | | | | | | | | This reverts commit r282294. It breaks a Linux bot: http://lab.llvm.org:8011/builders/clang-cmake-aarch64-42vma/builds/12180 It looks like the test checks that __llvm_profile_set_filename() alters the raw profile filename in both the dylib and the main program. Now that lprofCurFilename is hidden, this can't work, and we get two profiles (one for the call to "main" and one for "func"). Back this change out so that we don't affect external users. llvm-svn: 282304
* [MC] Support .ds directives in assembler parserPetr Hosek2016-09-232-0/+107
| | | | | | | | These directives are already supported by GNU assembler. Differential Revision: https://reviews.llvm.org/D24740 llvm-svn: 282303
* llc: Add -start-before/-stop-before optionsMatthias Braun2016-09-237-46/+99
| | | | | | Differential Revision: https://reviews.llvm.org/D23089 llvm-svn: 282302
* Update clang for r282299.Peter Collingbourne2016-09-231-17/+3
| | | | llvm-svn: 282301
* annotate more function visibilitySaleem Abdulrasool2016-09-232-10/+10
| | | | | | | | These data and text symbols were missing annotations for building with hidden visibility. As we do not currently enable hidden visibility by default, this is a NFC for the buildbots. llvm-svn: 282300
* LTO: Simplify caching interface.Peter Collingbourne2016-09-239-301/+204
| | | | | | | | | | | | | | | | | The NativeObjectOutput class has a design problem: it mixes up the caching policy with the interface for output streams, which makes the client-side code hard to follow and would for example make it harder to replace the cache implementation in an arbitrary client. This change separates the two aspects by moving the caching policy to a separate field in Config, replacing NativeObjectOutput with a NativeObjectStream class which only deals with streams and does not need to be overridden by most clients and introducing an AddFile callback for adding files (e.g. from the cache) to the link. Differential Revision: https://reviews.llvm.org/D24622 llvm-svn: 282299
* Allow for tests to be disabled at runtimeFrancis Ricci2016-09-234-1/+93
| | | | | | | | | | | | | | | | Summary: The current implementation of the test suite allows the user to run a certain subset of tests using '-p', but does not allow the inverse, where a user wants to run all but some number of known failing tests. Implement this functionality. Reviewers: labath, zturner, tfiala Subscribers: jingham, sas, lldb-commits Differential Revision: https://reviews.llvm.org/D24629 llvm-svn: 282298
* Install only the manpage and only in the proper locationEnrico Granata2016-09-231-35/+1
| | | | llvm-svn: 282297
* [AMDGPU] Fix for bz30427: wrong MTBUF encoding on VIValery Pykhtin2016-09-231-6/+10
| | | | | | Differential revision: https://reviews.llvm.org/D24875 llvm-svn: 282296
* Warn if we can't find the entry symbol.Rafael Espindola2016-09-232-4/+11
| | | | | | Fixes pr30465. llvm-svn: 282295
* [profile] Hide lprofCurFilenameVedant Kumar2016-09-231-1/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D24885 llvm-svn: 282294
* [analyzer] Fix crash in RetainCountChecker::checkEndFunctionAlexander Shaposhnikov2016-09-233-5/+13
| | | | | | | | | | | | | | | | | The class BodyFarm creates bodies for OSAtomicCompareAndSwap*, objc_atomicCompareAndSwap*, dispatch_sync*, dispatch_once* and for them the flag isBodyAutosynthesized is set to true. This diff 1. makes AnalysisConsumer::HandleCode skip the autosynthesized code 2. replaces assert(LCtx->getParent()) in RetainCountChecker::checkEndFunction by assert(!LCtx->inTopFrame()) (minor cleanup) Test plan: make -j8 check-clang-analysis Differential revision: https://reviews.llvm.org/D24792 llvm-svn: 282293
* [libFuzzer] first steps in adding a proper automated test suite based on ↵Kostya Serebryany2016-09-232-0/+48
| | | | | | real-life code: add a script to build RE2 at a revision that has known bugs llvm-svn: 282292
* [LTO] Add -flto-jobs=N to control backend parallelismTeresa Johnson2016-09-233-4/+42
| | | | | | | | | | | | | | | | | | | | Summary: Currently, a linker option must be used to control the backend parallelism of ThinLTO. The linker option varies depending on the linker (e.g. gold vs ld64). Add a new clang option -flto-jobs=N to control this. I've added in the wiring to pass this to the gold plugin. I also added in the logic to pass this down in the form I understand that ld64 uses on MacOS, for the darwin target. Reviewers: mehdi_amini, dexonsmith Subscribers: mehdi_amini, cfe-commits Differential Revision: https://reviews.llvm.org/D24826 llvm-svn: 282291
* [gold] Split plugin options controlling ThinLTO and codegen parallelism.Teresa Johnson2016-09-232-11/+12
| | | | | | | | | | | | | | | | Summary: As suggested in D24826, use different options for ThinLTO backend parallelism from the option controlling regular LTO code gen parallelism. They are already split in the LTO API, and this enables controlling them with different clang options. Reviewers: pcc, mehdi_amini Subscribers: dexonsmith, llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D24873 llvm-svn: 282290
* Revert "set the underlying value of “#pragma STDC FP_CONTRACT” on by ↵Renato Golin2016-09-236-226/+13
| | | | | | | | default" This reverts commit r282259, as it broke the AArch64 test-suite bots. llvm-svn: 282289
* [Coverage] Clarify a function contract (NFC)Vedant Kumar2016-09-231-1/+2
| | | | llvm-svn: 282287
* [llvm-cov] Factor out logic to remove unmapped inputs (NFC)Vedant Kumar2016-09-231-5/+13
| | | | llvm-svn: 282286
* Avoid counting sections twice.Rafael Espindola2016-09-232-12/+10
| | | | | | | | | | | | | We were counting the size of the bss section holding common symbols twice: Dot += CurOutSec->getSize(); flush(); The new code is also simpler as now flush is the only function that inserts in AlreadyOutputOS, which makes sense since the set hold fully output sections. llvm-svn: 282285
* [libFuzzer] reset Counters (trace-pc-guard) before every runKostya Serebryany2016-09-231-1/+1
| | | | llvm-svn: 282284
* [MC] Support .dcb directives in assembler parserPetr Hosek2016-09-232-35/+208
| | | | | | | | These directives are already supported by GNU assembler. Differential Revision: https://reviews.llvm.org/D24741 llvm-svn: 282283
* [llvm-cov] Filter away source files that aren't in the coverage mappingVedant Kumar2016-09-232-4/+21
| | | | | | | | ... so that they don't show up in the index. This came up because polly contains a .git directory and some other unmapped input in its source dir. llvm-svn: 282282
* [llvm-cov] Get rid of all invalid filename referencesVedant Kumar2016-09-2310-33/+43
| | | | | | | | | | | | | | We used to append filenames into a vector of std::string, and then append a reference to each string into a separate vector. This made it easier to work with the getUniqueSourceFiles API. But it's buggy. std::string has a small-string optimization, so you can't expect to capture a reference to one if you're copying it into a growing vector. Add a test that triggers this invalid reference to std::string scenario, and kill the issue with fire by just using ArrayRef<std::string> everywhere. llvm-svn: 282281
* [llvm-cov] Minor cleanup. NFC.Vedant Kumar2016-09-231-6/+6
| | | | llvm-svn: 282280
* [ELF] Resolve weak undefined TLS symbols when no phdr is available.Davide Italiano2016-09-232-0/+24
| | | | | | | | | | | | If we pass --gc-sections to lld and .tbss is not referenced, the section is reclaimed and lld doesn't create a TLS program header. R_TLS tries to access the program header -> lld crashes. Mimic what bfd/gold do in this case and resolve a weak undefined TLS symbol to the base of the TLS block, i.e. give it a value of zero. Differential Revision: https://reviews.llvm.org/D24832 llvm-svn: 282279
* [TLI] isdigit / isascii / toascii param type should match return type (PR30484)Sanjay Patel2016-09-232-1/+39
| | | | | | We crash in LibCallSimplifier if we don't check the validity of the function signature properly. llvm-svn: 282278
* Change Module::RemapPath to use StringRef.Zachary Turner2016-09-236-14/+20
| | | | llvm-svn: 282277
* [ResetMachineFunction] Populate the comments in the header of the file.Quentin Colombet2016-09-231-3/+6
| | | | | | NFC llvm-svn: 282276
* [ResetMachineFunction] Add statistic on the number of reset functions.Quentin Colombet2016-09-231-0/+4
| | | | | | | | As the development of GlobalISel move forward, this statistic should strictly decrease until it reaches zero. At this point, it would mean GlobalISel can replace SDISel (at least on the tested inputs :P). llvm-svn: 282275
* [RegisterBankInfo] Add statistics for dynamic partial mappings.Quentin Colombet2016-09-231-0/+11
| | | | | | | | Collect statistics about the number of partial mappings dynamically allocated and accessed. Ultimately, when the whole TableGen infrastructure is set, those numbers should be zero. llvm-svn: 282274
* ScheduleDAG: Match enum names when printing sdep kindsMatthias Braun2016-09-236-30/+30
| | | | | | | It is less confusing to have the same names in the debug print as the enum members. llvm-svn: 282273
* BitcodeReader: Deduplicate code. NFC.Peter Collingbourne2016-09-231-125/+75
| | | | | | Differential Revision: https://reviews.llvm.org/D24852 llvm-svn: 282272
* Try again to match the logic of the code before re-writing.Zachary Turner2016-09-231-1/+1
| | | | llvm-svn: 282271
* Try to fix failing TestDataFormatterSkipSummary test case.Zachary Turner2016-09-231-1/+3
| | | | llvm-svn: 282270
* Update the prompt related functions to use StringRefs.Zachary Turner2016-09-2319-82/+118
| | | | llvm-svn: 282269
* Simplify. NFC.Rui Ueyama2016-09-231-14/+6
| | | | llvm-svn: 282268
* [RegBankSelect] Use DEBUG_TYPE instead of repeating the name of the passQuentin Colombet2016-09-231-2/+2
| | | | | | NFC llvm-svn: 282267
* [RegisterBank] Mark the dump method with LLVM_DUMP_METHOD.Quentin Colombet2016-09-231-1/+1
| | | | | | NFC llvm-svn: 282266
* Update OptionGroup::SetValue to take StringRef.Zachary Turner2016-09-2370-252/+320
| | | | | | | | Then deal with all the fallout. Differential Revision: https://reviews.llvm.org/D24847 llvm-svn: 282265
* Fix the following tests when running under cross-compilation:Chad Rosier2016-09-234-6/+6
| | | | | | | | | | | | | Profile-aarch64 :: Linux/comdat_rename.test Profile-aarch64 :: Linux/extern_template.test Profile-aarch64 :: Linux/instrprof-comdat.test Profile-aarch64 :: Linux/instrprof-cs.c The issue is that the created (aarch64) binaries were attempting to run natively instead of running through %run, which guarantees running in the proper environment if the compilation was configured correctly. llvm-svn: 282264
* [compiler-rt] Fix a broken asan 64-bit test using ld_preloadEtienne Bergeron2016-09-231-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The 'asan_preload_test-1.cc' is not working with the i686 architecture. To repro the error, run on a linux 64-bit: ``` ninja check-asan-dynamic ``` The following error occurs: ``` -- Exit Code: 1 Command Output (stderr): -- /home/llvm/llvm/projects/compiler-rt/test/asan/TestCases/Linux/asan_preload_test-1.cc:18:12: error: expected string not found in input // CHECK: AddressSanitizer: heap-buffer-overflow ^ <stdin>:1:1: note: scanning from here ERROR: ld.so: object 'libclang_rt.asan-i686.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ^ <stdin>:2:10: note: possible intended match here ==25982==AddressSanitizer CHECK failed: /home/llvm/llvm/projects/compiler-rt/lib/asan/asan_interceptors.cc:736 "((__interception::real_memcpy)) != (0)" (0x0, 0x0) ``` The unittest is running (where %shared_libasan is replaced by libclang_rt.asan-i686.so): ``` // RUN: env LD_PRELOAD=%shared_libasan not %run %t 2>&1 | FileCheck %s ``` But the executable also has a dependancy on libclang_rt.asan-i386.so (added by the clang driver): ``` linux-gate.so.1 => (0xf77cc000) libclang_rt.asan-i386.so => not found libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xf76ba000) libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf7673000) libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xf7656000) libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf74a7000) ``` By looking to the clang driver (tools.cpp) we can see that every x86 architecture are mapped to 'i386'. ``` StringRef MyArch; switch (getToolChain().getArch()) { case llvm::Triple::arm: MyArch = "arm"; break; case llvm::Triple::x86: MyArch = "i386"; break; case llvm::Triple::x86_64: MyArch = "amd64"; break; default: llvm_unreachable("Unsupported architecture"); } ``` This patch is implementing the same mapping but in the compiler-rt unittest. Reviewers: rnk, vitalybuka Subscribers: aemerson, kubabrecka, dberris, llvm-commits, chrisha Differential Revision: https://reviews.llvm.org/D24838 llvm-svn: 282263
* Enhance calcColdCallHeuristics for InvokeInstJun Bum Lim2016-09-232-0/+103
| | | | | | | | | | | | Summary: When identifying cold blocks, consider only the edge to the normal destination if the terminator is InvokeInst and let calcInvokeHeuristics() decide edge weights for the InvokeInst. Reviewers: mcrosier, hfinkel, davidxl Subscribers: mcrosier, llvm-commits Differential Revision: https://reviews.llvm.org/D24868 llvm-svn: 282262
* [asan] Stop appending -lm, -pthread and other linker options on Darwin for ↵Kuba Brecka2016-09-231-6/+7
| | | | | | | | | | ASan unit tests On Darwin, -lm, -pthread and others are implied. -pthread currently produces a warning (compiler option unused). Differential Revision: https://reviews.llvm.org/D24698 llvm-svn: 282260
* set the underlying value of “#pragma STDC FP_CONTRACT” on by defaultSebastian Pop2016-09-236-13/+226
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clang has the default FP contraction setting of “-ffp-contract=on”, which doesn't really mean “on” in the conventional sense of the word, but rather really means “according to the per-statement effective value of the relevant pragma”. Before this patch, Clang has that pragma defaulting to “off”. Since the “-ffp-contract=on” mode is really an AND of two booleans and the second of them defaults to “off”, the whole thing effectively defaults to “off”. This patch changes the default value of the pragma to “on”, thus making the default pair of booleans (on, on) rather than (on, off). This makes FP optimization slightly more aggressive than before when not using either “-Ofast”, “-ffast-math”, or “-ffp-contract=fast”. Even with this patch the compiler still respects “-ffp-contract=off”. As per a suggestion by Steve Canon, the added code does _not_ require “-O3” or higher. This is so as to try our best to preserve identical floating-point results for unchanged source code compiling for an unchanged target when only changing from any optimization level in the set (“-O0”, “-O1”, “-O2”, “-O3”) to any other optimization level in that set. “-Os” and “-Oz” seem to be behaving identically, i.e. should probably be considered a part of the aforementioned set, but I have not reviewed this rigorously. “-Ofast” is explicitly _not_ a member of that set. Patch authored by Abe Skolnik [a.skolnik@samsung.com] and Stephen Canon [scanon@apple.com]. Differential Revision: https://reviews.llvm.org/D24481 llvm-svn: 282259
* add hook for calling platform-dependent pre-kill action on a timed out testTodd Fiala2016-09-237-27/+351
| | | | | | | differential review: https://reviews.llvm.org/D24850 reviewers: clayborg, labath llvm-svn: 282258
* Revert of r282255 because of "Fell off the end of a string-switch" buildbotSjoerd Meijer2016-09-231-7/+0
| | | | | | failures. llvm-svn: 282257
OpenPOWER on IntegriCloud