summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* AsmPrinter: Make DIEString smallDuncan P. N. Exon Smith2015-05-244-90/+112
| | | | | | | | | | | | | | | Expose the `DwarfStringPool` entry in a header, and store a pointer to it directly in `DIEString`. Instead of choosing at creation time how to emit it, use the `dwarf::Form` to determine that at emission time. Besides avoiding the other `DIEValue`, this shaves two pointers off of `DIEString`; the data is now a single pointer. This is a nice cleanup on its own -- and drops memory usage from 861 MB down to 853 MB, around 0.9% -- but it's also preparation for passing `DIEValue`s by value. (I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`; see r236629 for details.) llvm-svn: 238117
* AsmPrinter: Extract DwarfStringPoolEntry from DwarfStringPool, NFCDuncan P. N. Exon Smith2015-05-243-14/+59
| | | | | | | | | Extract out `DwarfStringPoolEntry` and `DwarfStringPoolRef` from `DwarfStringPool` so that downstream users can start using `DwarfStringPool::getEntry()` directly. This will allow users to delay the decision between emitting a symbol or an offset until later. llvm-svn: 238116
* [ELF] Fix lld when no unique sections is usedSimon Atanasyan2015-05-244-6/+25
| | | | | | | | | Original patch of Shankar Easwaran with additional test case. The yaml2obj does not allow to create an object file with non-unique sections names so the fix uses a binary input object file in the test case. llvm-svn: 238115
* AsmPrinter: Emit the DwarfStringPool offset directly when possibleDuncan P. N. Exon Smith2015-05-245-28/+39
| | | | | | | | | | | | | Change `DwarfStringPool` to calculate byte offsets on-the-fly, and update `DwarfUnit::getLocalString()` to use a `DIEInteger` instead of a `DIEDelta` when Dwarf doesn't use relocations (i.e., Mach-O). This eliminates another call to `EmitLabelDifference()`, and drops memory usage from 865 MB down to 861 MB, around 0.5%. (I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`; see r236629 for details.) llvm-svn: 238114
* DebugInfo: Clarify test/DebugInfo/X86/stmt-list-multiple-compile-units.llDuncan P. N. Exon Smith2015-05-241-4/+6
| | | | | | | | This test was relying on the numbering of preceding .set directives, but an upcoming commit is going to remove some of them. Make the CHECKs more nuanced. llvm-svn: 238113
* AsmPrinter: Refactor DwarfStringPool::getEntry(), NFCDuncan P. N. Exon Smith2015-05-242-14/+11
| | | | | | | | Move `DwarfStringPool`'s `getEntry()` to the header (and make it a member function) in preparation for calculating symbol offsets on-the-fly. llvm-svn: 238112
* Remove log2 dependency when building against Android API-9 SDKVince Harron2015-05-241-1/+1
| | | | | | | | | | | | | Android's API-9 SDK is missing log2 builtins. A previous commit added support for building against this API revision but this requires log2l to be present. (And it doesn't seem to be defined, despite being in the headers.) Author: pasaulais (Pierre-Andre Saulais) Differential Revision: http://reviews.llvm.org/D9884 llvm-svn: 238111
* Move parseSubArch to ARMTargetParser. NFCRenato Golin2015-05-241-30/+58
| | | | | | | | | | | | Using getCanonicalArchName() is the right way to parse ARM arch names. Mapping ARMTargetParser IDs to Triple Arch IDs is temporary, until they are merged into a TargetDescription class. This was the last LLVM FIXME to move things to ARMTargetParser. Now on to Clang and beyond. llvm-svn: 238110
* [msan] Mprotect all inaccessible memory regions.Evgeniy Stepanov2015-05-244-12/+75
| | | | | | | | | | | | | | | | | Fix 2 bugs in memory mapping setup: - the invalid region at offset 0 was not protected because mmap at address 0 fails with EPERM on most Linux systems. We did not notice this because the check condition was flipped: the code was checking that mprotect has failed. And the test that was supposed to catch this was weakened by the mitigations in the mmap interceptor. - when running without origins, the origin shadow range was left unprotected. The new test ensures that mmap w/o MAP_FIXED always returns valid application addresses. llvm-svn: 238109
* Add target hook to allow merging stores of nonzero constantsMatt Arsenault2015-05-246-5/+566
| | | | | | | | | | On GPU targets, materializing constants is cheap and stores are expensive, so only doing this for zero vectors was silly. Most of the new testcases aren't optimally merged, and are for later improvements. llvm-svn: 238108
* [Support/ELF] Add missing DF_1_XXX bits.Davide Italiano2015-05-231-1/+10
| | | | | | | | | | In preparation for adding support for decoding DF_FLAGS_1 to llvm-readobj. Differential Revision: http://reviews.llvm.org/D9955 Reviewed by: echristo llvm-svn: 238107
* [Driver] Unbreak hexagon build botsDavid Majnemer2015-05-231-1/+1
| | | | | | | | AddHexagonTargetArgs didn't respect the driver flags by unconditionally pushing -fno-signed-char. Instead, add Hexagon handling to isSignedCharDefault. llvm-svn: 238106
* [Driver] Handle -fno-signed-char and -fno-unsigned-charDavid Majnemer2015-05-233-5/+23
| | | | | | | GCC maps -fno-unsigned-char to -fsigned-char and -fno-signed-char to -funsigned-char. llvm-svn: 238105
* Bump SmallString to the minimum required amount for raw_ostream to avoid ↵Benjamin Kramer2015-05-231-1/+1
| | | | | | | | allocation. NFC. llvm-svn: 238104
* [Mips] Prefer Twine::utohexstr over utohexstr, saves a string copy.Benjamin Kramer2015-05-231-3/+2
| | | | | | NFC. llvm-svn: 238103
* [AArch64] Clean up the ELF streamer a bit.Benjamin Kramer2015-05-234-18/+7
| | | | llvm-svn: 238102
* [AArch64] Move AArch64TargetStreamer out of MCStreamer.hBenjamin Kramer2015-05-235-29/+47
| | | | | | It doesn't belong in the shared MC layer. NFC. llvm-svn: 238101
* [llgo] cmd/llgoi: use line editorAndrew Wilkins2015-05-2326-48/+2679
| | | | | | | | | | | | | | | | | | | Summary: This diff adds line-editing to llgoi, by vendoring and using github.com/peterh/liner. I have only implemented the basics here; follow-ups will come later to add persisted history, and completion, Reviewers: pcc Reviewed By: pcc Subscribers: axw, llvm-commits Differential Revision: http://reviews.llvm.org/D9811 llvm-svn: 238100
* Silencing a spurious -Wreturn-type warning; NFC.Aaron Ballman2015-05-231-0/+1
| | | | llvm-svn: 238099
* [clang-tidy] Fix for llvm.org/PR23572Szabolcs Sipos2015-05-232-1/+9
| | | | | | misc-static-assert won't report asserts whose conditions contain calls to non constexpr functions. llvm-svn: 238098
* [PowerPC] Fix fast-isel when compare is split from branchHal Finkel2015-05-232-19/+104
| | | | | | | | | | | When the compare feeding a branch was in a different BB from the branch, we'd try to "regenerate" the compare in the block with the branch, possibly trying to make use of values not available there. Copy a page from AArch64's play book here to fix the problem (at least in terms of correctness). Fixes PR23640. llvm-svn: 238097
* Update ExecutionEngine/LLVMBuild.txt, to add LLVMCodeGen.NAKAMURA Takumi2015-05-231-1/+1
| | | | llvm-svn: 238096
* Give more meaningful names than I and J to some for loop variables after ↵Craig Topper2015-05-231-10/+10
| | | | | | converting to range-based loops. llvm-svn: 238095
* Fix an unused variable warning in release builds.Craig Topper2015-05-231-0/+1
| | | | llvm-svn: 238094
* Use range-based for loops. NFC.Craig Topper2015-05-231-76/+36
| | | | llvm-svn: 238093
* Remove unnecessary indirection through SCEVTobias Grosser2015-05-231-4/+1
| | | | llvm-svn: 238092
* Use unique_ptr to clarify ownershop of ScopArrayInfoMapTobias Grosser2015-05-232-10/+7
| | | | llvm-svn: 238091
* Use unique_ptr to clarify ownership of ScopStmtTobias Grosser2015-05-237-47/+38
| | | | llvm-svn: 238090
* Did some cleanup to stop us from leaking Pipe file descriptors.Greg Clayton2015-05-235-8/+39
| | | | | | | | | | The main issue was the Communication::Disconnect() was calling its Connection::Disconnect() but this wouldn't release the pipes that the ConnectionFileDescriptor was using. We also have someone that is holding a strong reference to the Process so that when you re-run, target replaces its m_process_sp, but it doesn't get destructed because someone has a strong reference to it. I need to track that down. But, even if we have a strong reference to the a process that is outstanding, we need to call Process::Finalize() to have it release as much of its resources as possible to avoid memory bloat. Removed the ProcessGDBRemote::SetExitStatus() override and replaced it with ProcessGDBRemote::DidExit(). Now we aren't leaking file descriptors and the stand alone test suite should run much better. llvm-svn: 238089
* Enable scalar and PHI code generation for PollyTobias Grosser2015-05-232-2/+2
| | | | | | | | | The feature itself has been committed by Johannes in r238070. As this is the way forward, we now enable it to ensure we get test coverage. Thank you Johannes for this nice work! llvm-svn: 238088
* Make use of scalar/phi code generation explicit in the testsTobias Grosser2015-05-2314-45/+135
| | | | | | | | | | This ensures we pass all tests independently of how we set the options -disable-polly-intra-scop-scalar-to-array and -polly-model-phi-nodes. (At least if we enable both or disable both. Enabling them individually makes little sense, as they will hopefully disappear soon anyhow). llvm-svn: 238087
* [lib/Fuzzer] doxygen-ify the comments for the user interfaceKostya Serebryany2015-05-231-13/+22
| | | | llvm-svn: 238086
* [dfsan] ignore more __sanitizer callbacksKostya Serebryany2015-05-231-5/+3
| | | | llvm-svn: 238085
* AsmPrinter: Remove the vtable-entry from DIEValueDuncan P. N. Exon Smith2015-05-232-128/+166
| | | | | | | | | | | | | | | | | Remove all virtual functions from `DIEValue`, dropping the vtable pointer from its layout. Instead, create "impl" functions on the subclasses, and use the `DIEValue::Type` to implement the dynamic dispatch. This is necessary -- obviously not sufficient -- for passing `DIEValue`s around by value. However, this change stands on its own: we make tons of these. I measured a drop in memory usage from 888 MB down to 860 MB, or around 3.2%. (I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`; see r236629 for details.) llvm-svn: 238084
* [Sema] Don't use dyn_cast to detect an AtomicTypeDavid Majnemer2015-05-232-1/+6
| | | | | | | | | | An AtomicType might be hidden behind arbitrary levels of typedefs. getAs<> will reliably walk through the sugar to get the underlying AtomicType. This fixes PR23638. llvm-svn: 238083
* CodeGen: Remove redundant DIETypeSignature::dump(), NFCDuncan P. N. Exon Smith2015-05-232-3/+0
| | | | | | We already have this in `DIEValue`; no reason to shadow it. llvm-svn: 238082
* [lib/Fuzzer] fully get rid of std::cerr in libFuzzerKostya Serebryany2015-05-233-38/+23
| | | | llvm-svn: 238081
* Stop resetting NoFramePointerElim in TargetMachine::resetTargetOptions.Akira Hatanaka2015-05-2315-38/+112
| | | | | | | | | | | | | | This is part of the work to remove TargetMachine::resetTargetOptions. In this patch, instead of updating global variable NoFramePointerElim in resetTargetOptions, its use in DisableFramePointerElim is replaced with a call to TargetFrameLowering::noFramePointerElim. This function determines on a per-function basis if frame pointer elimination should be disabled. There is no change in functionality except that cl:opt option "disable-fp-elim" can now override function attribute "no-frame-pointer-elim". llvm-svn: 238080
* Simplify and rename function overrideFunctionAttributes. NFC.Akira Hatanaka2015-05-237-31/+29
| | | | | | | This is in preparation to making changes needed to stop resetting NoFramePointerElim in resetTargetOptions. llvm-svn: 238079
* [lib/Fuzzer] start getting rid of std::cerr. Sadly, these parts of C++ ↵Kostya Serebryany2015-05-234-56/+47
| | | | | | library used in libFuzzer badly interract with the same code used in the target function and also with dfsan. It's easier to just not use std::cerr than to defeat these issues. llvm-svn: 238078
* Remove unnecessary command line option "-disable-fp-elim".Akira Hatanaka2015-05-231-1/+1
| | | | | | | This option currently has no effect as function attribute "no-frame-pointer-elim=false" overrides it. llvm-svn: 238077
* This reverts commit r238064 and r238055.Rafael Espindola2015-05-236-213/+1
| | | | | | They depend on a reverted llvm commit. llvm-svn: 238076
* Revert "make reciprocal estimate code generation more flexible by adding ↵Rafael Espindola2015-05-2312-357/+58
| | | | | | | | | | | | command-line options" This reverts commit r238051. It broke some bots: http://lab.llvm.org:8011/builders/llvm-ppc64-linux1/builds/18190 llvm-svn: 238075
* Correct a mistaken comment from 238071 [NFC]Philip Reames2015-05-231-3/+2
| | | | llvm-svn: 238074
* Produce a single string table in a ELF .oRafael Espindola2015-05-223-62/+45
| | | | | | | | | | | | | | | | | | | | Normally an ELF .o has two string tables, one for symbols, one for section names. With the scheme of naming sections like ".text.foo" where foo is a symbol, there is a big potential saving in using a single one. Building llvm+clang+lld with master and with this patch the results were: master: 193,267,008 bytes patch: 186,107,952 bytes master non unique section names: 183,260,192 bytes patch non unique section names: 183,118,632 bytes So using non usique saves 10,006,816 bytes, and the patch saves 7,159,056 while still using distinct names for the sections. llvm-svn: 238073
* [lld] Manage atom ordinals in the File class rather than using a static counter.Lang Hames2015-05-222-4/+10
| | | | | | | This is a cleaner fix for the race-condition bug that was originally papered over by r237857. llvm-svn: 238072
* Extend EarlyCSE to handle basic cases from JumpThreading and CVPPhilip Reames2015-05-226-21/+332
| | | | | | | | | | | | | | This patch extends EarlyCSE to take advantage of the information that a controlling branch gives us about the value of a Value within this and dominated basic blocks. If the current block has a single predecessor with a controlling branch, we can infer what the branch condition must have been to execute this block. The actual change to support this is downright simple because EarlyCSE's existing scoped hash table logic deals with most of the complexity around merging. The patch actually implements two optimizations. 1) The first is analogous to JumpThreading in that it enables EarlyCSE's CSE handling to fold branches which are exactly redundant due to a previous branch to branches on constants. (It doesn't actually replace the branch or change the CFG.) This is pretty clearly a win since it enables substantial CFG simplification before we start trying to inline. 2) The second is analogous to CVP in that it exploits the knowledge gained to replace dominated *uses* of the original value. EarlyCSE does not otherwise reason about specific uses, so this is the more arguable one. It does enable further simplication and constant folding within the rest of the visit by EarlyCSE. In both cases, the added code only handles the easy dominance based case of each optimization. The general case is deferred to the existing passes. Differential Revision: http://reviews.llvm.org/D9763 llvm-svn: 238071
* Add scalar and phi code generationJohannes Doerfert2015-05-2213-49/+1372
| | | | | | | | | | | | | | | | | | | | | | | | | | | | To reduce compile time and to allow more and better quality SCoPs in the long run we introduced scalar dependences and PHI-modeling. This patch will now allow us to generate code if one or both of those options are set. While the principle of demoting scalars as well as PHIs to memory in order to communicate their value stays the same, this allows to delay the demotion till the very end (the actual code generation). Consequently: - We __almost__ do not modify the code if we do not generate code for an optimized SCoP in the end. Thus, the early exit as well as the unprofitable option will now actually preven us from introducing regressions in case we will probably not get better code. - Polly can be used as a "pure" analyzer tool as long as the code generator is set to none. - The original SCoP is almost not touched when the optimized version is placed next to it. Runtime regressions if the runtime checks chooses the original are not to be expected and later optimizations do not need to revert the demotion for that part. - We will generate direct accesses to the demoted values, thus there are no "trivial GEPs" that select the first element of a scalar we demoted and treated as an array. Differential Revision: http://reviews.llvm.org/D7513 llvm-svn: 238070
* Use target's SIGSTOP and SIGINT when making decision about continue after ↵Oleksiy Vyalov2015-05-221-6/+6
| | | | | | | | async packet. http://reviews.llvm.org/D9857 llvm-svn: 238068
* [InstCombine] Don't eagerly propagate nsw for A*B+A*C => A*(B+C)David Majnemer2015-05-222-3/+58
| | | | | | | | | | | | | | | | InstCombine transforms A *nsw B +nsw A *nsw C to A *nsw (B + C). This is incorrect -- e.g. if A = -1, B = 1, C = INT_SMAX. Then nothing in the LHS overflows, but the multiplication in RHS overflows. We need to first make sure that we won't multiple by INT_SMAX + 1. Test case `add_of_mul` contributed by Sanjoy Das. This fixes PR23635. Differential Revision: http://reviews.llvm.org/D9629 llvm-svn: 238066
OpenPOWER on IntegriCloud