summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Fix this module to work with current packects and also to be able to figure ↵Greg Clayton2015-05-221-15/+39
| | | | | | out average packets speed and standard deviation. llvm-svn: 238065
* add missing include for TargetRecipSanjay Patel2015-05-221-0/+1
| | | | llvm-svn: 238064
* [lib/Fuzzer] remove -use_coverage_pairs=1, an experimental feature that is ↵Kostya Serebryany2015-05-225-30/+1
| | | | | | unlikely to ever scale llvm-svn: 238063
* [lib/Fuzzer] mention the user-supplied mutatorsKostya Serebryany2015-05-221-0/+8
| | | | llvm-svn: 238062
* Fix doxygen commentsJonathan Peyton2015-05-222-8/+6
| | | | | | These fixes make doxygen happy. llvm-svn: 238061
* Fix spelling errorsJonathan Peyton2015-05-2210-12/+12
| | | | | | These spelling errors are in comments and some debug messages. llvm-svn: 238060
* [lib/Fuzzer] extend the fuzzer interface to allow user-supplied mutatorsKostya Serebryany2015-05-2212-67/+258
| | | | llvm-svn: 238059
* CodeGen: Avoid a reserved name and fix the naming style of some arguments. NFCJustin Bogner2015-05-221-8/+8
| | | | | | | It's undefined to use reserved names like _Diags. Fix up the other parameter names to consistently use a modern style while I'm here. llvm-svn: 238058
* builtins: mark functions as aapcs on WindowsSaleem Abdulrasool2015-05-221-1/+5
| | | | | | | | Windows does not use AAPCS, but rather AAPCS-VFP, and thus the functions which are assumed to be AAPCS will cause invalid argument setup. Ensure that the functions are marked as AAPCS. llvm-svn: 238056
* add the -mrecip driver flag and process its optionsSanjay Patel2015-05-226-1/+212
| | | | | | | | | | | | | | | This is the front-end counterpart to D8982 (LLVM r238051). The -mrecip option interface is based on maintaining compatibility with gcc: https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/i386-and-x86-64-Options.html#index-mrecip_003dopt-1627 https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/RS_002f6000-and-PowerPC-Options.html#index-mrecip-2289 ...while adding more functionality (allowing users to specify the number of refinement steps for each estimate type). Differential Revision: http://reviews.llvm.org/D8989 llvm-svn: 238055
* [AArch64][CGP] Sink zext feeding stxr/stlxr into the same block.Ahmed Bougacha2015-05-222-4/+12
| | | | | | | | | | | The usual CodeGenPrepare trickery, on a target-specific intrinsic. Without this, the expansion of atomics will usually have the zext be hoisted out of the loop, defeating the various patterns we have to catch this precise case. Differential Revision: http://reviews.llvm.org/D9930 llvm-svn: 238054
* Relax these tests a bit.Rafael Espindola2015-05-229-25/+25
| | | | | | It is not relevant where in the string table the name is located. llvm-svn: 238053
* [AArch64] Robustize atomic cmpxchg test a little more. NFC.Ahmed Bougacha2015-05-221-45/+47
| | | | | | | We changed the test to test non-constant values in r238049. We can also use CHECK-NEXT to be a little stricter. llvm-svn: 238052
* make reciprocal estimate code generation more flexible by adding ↵Sanjay Patel2015-05-2212-58/+357
| | | | | | | | | | | | | | | | command-line options This patch adds a class for processing many recip codegen possibilities. The TargetRecip class is intended to handle both command-line options to llc as well as options passed in from a front-end such as clang with the -mrecip option. The x86 backend is updated to use the new functionality. Only -mcpu=btver2 with -ffast-math should see a functional change from this patch. All other CPUs continue to *not* use reciprocal estimates by default with -ffast-math. Differential Revision: http://reviews.llvm.org/D8982 llvm-svn: 238051
* [Mips] Cleanup and reformat test cases, add more checkingsSimon Atanasyan2015-05-224-165/+193
| | | | | | No functional changes. llvm-svn: 238050
* [AArch64] Robustize atomic cmpxchg test. NFC.Ahmed Bougacha2015-05-221-13/+27
| | | | | | Constants are easy to get right the wrong way. llvm-svn: 238049
* Make unique section names the default again.Rafael Espindola2015-05-222-16/+3
| | | | | | | | | | Using non unique names found a bug in the ICF inplementation in gold: https://sourceware.org/bugzilla/show_bug.cgi?id=18440 This reverts commit r234143. llvm-svn: 238048
* Reinforce ARMTargetParser::getCanonicalArchName validationRenato Golin2015-05-221-14/+20
| | | | | | | | | | | | | Before, getCanonicalArchName was relying on parseArch() to validate the arch name, which was a problem when other methods, that also needed to call it, were duplicating the steps. But to dissociate getCanonicalArchName from parseArch, we needed to make getCanonicalArchName more robust in detecting valid arch names. It's still not perfect, but will do for the time being, until we merge Triple with TargetParser into a TargetDescription mega class. llvm-svn: 238047
* Use new MachineInstr mayLoadOrStore() API. NFC.Chad Rosier2015-05-222-3/+2
| | | | llvm-svn: 238044
* dotest.py - fixed a bug displaying usageVince Harron2015-05-223-5/+8
| | | | | | ./dotest.py --help llvm-svn: 238043
* Implement PlatformWindows::GetEnvironment.Zachary Turner2015-05-227-12/+44
| | | | | | | This fixes a couple of tests that rely on being able to get the host's environment or spawn an inferior with specific arguments. llvm-svn: 238042
* Fix use-after-free in OptionValueString.Zachary Turner2015-05-221-1/+1
| | | | | | | We were assigning a temporary std::string to a StringRef. Somehow this worked on every platform but Windows. llvm-svn: 238041
* Disable TestConcurrentEvents.py on Windows.Zachary Turner2015-05-221-1/+1
| | | | | | | This test takes over 5 minutes to run just by itself, and everything fails anyway, so it doesn't make sense to keep it running for now. llvm-svn: 238040
* [TestRaise] Skip the SIGRTMIN test on Android.Siva Chandra2015-05-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Running "kill -l" on nexus player (i386) device results in this: 1 HUP Hangup 33 33 Signal 33 2 INT Interrupt 34 34 Signal 34 3 QUIT Quit 35 35 Signal 35 4 ILL Illegal instruction 36 36 Signal 36 5 TRAP Trap 37 37 Signal 37 6 ABRT Aborted 38 38 Signal 38 7 BUS Bus error 39 39 Signal 39 8 FPE Floating point exception 40 40 Signal 40 9 KILL Killed 41 41 Signal 41 10 USR1 User signal 1 42 42 Signal 42 11 SEGV Segmentation fault 43 43 Signal 43 12 USR2 User signal 2 44 44 Signal 44 13 PIPE Broken pipe 45 45 Signal 45 14 ALRM Alarm clock 46 46 Signal 46 15 TERM Terminated 47 47 Signal 47 16 STKFLT Stack fault 48 48 Signal 48 17 CHLD Child exited 49 49 Signal 49 18 CONT Continue 50 50 Signal 50 19 STOP Stopped (signal) 51 51 Signal 51 20 TSTP Stopped 52 52 Signal 52 21 TTIN Stopped (tty input) 53 53 Signal 53 22 TTOU Stopped (tty output) 54 54 Signal 54 23 URG Urgent I/O condition 55 55 Signal 55 24 XCPU CPU time limit exceeded 56 56 Signal 56 25 XFSZ File size limit exceeded 57 57 Signal 57 26 VTALRM Virtual timer expired 58 58 Signal 58 27 PROF Profiling timer expired 59 59 Signal 59 28 WINCH Window size changed 60 60 Signal 60 29 IO I/O possible 61 61 Signal 61 30 PWR Power failure 62 62 Signal 62 31 SYS Bad system call 63 63 Signal 63 32 32 Signal 32 64 64 Signal 64 The signals from 33-64 are missing symbolic names. Test Plan: dotest.py -p TestRaise on Android Reviewers: labath Subscribers: tberghammer, aemerson, lldb-commits Differential Revision: http://reviews.llvm.org/D9944 llvm-svn: 238039
* [bpf] emit jmp fixups in little endianAlexei Starovoitov2015-05-221-1/+3
| | | | | | | | The 'off' field of 'struct bpf_insn' is in cpu-endianness, since the rest is emitted as little endian, make sure that 'off' field is little endian as well. llvm-svn: 238038
* Use profile and version parsers from ARMTargetParserRenato Golin2015-05-221-32/+5
| | | | | | | Now that ARMTargetParser can parse profile and version numbers, use them instead of the local implementation. llvm-svn: 238037
* Adding profile and version parsers to ARMTargetParserRenato Golin2015-05-224-2/+110
| | | | | | | This allows us to match armv6m to default to thumb, but will also be used by Clang's driver and remove the current incomplete copy in it. llvm-svn: 238036
* Reapply r238011 with a fix for the trap instruction.Quentin Colombet2015-05-228-110/+264
| | | | | | | | | | | | | | | | | | | The problem was that I slipped a change required for shrink-wrapping, namely I used getFirstTerminator instead of the getLastNonDebugInstr that was here before the refactoring, whereas the surrounding code is not yet patched for that. Original message: [X86] Refactor the prologue emission to prepare for shrink-wrapping. - Add a late pass to expand pseudo instructions (tail call and EH returns). Instead of doing it in the prologue emission. - Factor some static methods in X86FrameLowering to ease code sharing. NFC. Related to <rdar://problem/20821487> llvm-svn: 238035
* Remove redundant std::move on functions that return a unique_ptr.Benjamin Kramer2015-05-222-5/+5
| | | | llvm-svn: 238034
* [Unroll] Separate the logic for testing each iteration of the loop,Chandler Carruth2015-05-221-106/+111
| | | | | | | | | | | | | | | | | | accumulating estimated cost, and other loop-centric logic from the logic used to analyze instructions in a particular iteration. This makes the visitor very narrow in scope -- all it does is visit instructions, update a map of simplified values, and return whether it is able to optimize away a particular instruction. The two cost metrics are now returned as an optional struct. When the optional is left unengaged, there is no information about the unrolled cost of the loop, when it is engaged the cost metrics are available to run against the thresholds. No functionality changed. llvm-svn: 238033
* [PPC64] Add support for clrbhrb, mfbhrbe, rfebb.Bill Schmidt2015-05-229-0/+103
| | | | | | | | | | | This patch adds support for the ISA 2.07 additions involving the branch history rolling buffer and event-based branching. These will not be used by typical applications, so built-in support is not required. They will only be available via inline assembly. Assembly/disassembly tests are included in the patch. llvm-svn: 238032
* Add clarifying note that sampling-based profiles cannot be used for code ↵Diego Novillo2015-05-221-0/+4
| | | | | | coverage. llvm-svn: 238031
* [ELF] Remove redundant unique_ptr moves found by -Wpessimizing-move.Benjamin Kramer2015-05-224-6/+6
| | | | llvm-svn: 238030
* [ELF] Fix shared CMake build.Benjamin Kramer2015-05-221-0/+1
| | | | llvm-svn: 238029
* Stop inventing symbol sizes.Rafael Espindola2015-05-227-112/+14
| | | | | | | | | | | | | | | | | | | | | MachO and COFF quite reasonably only define the size for common symbols. We used to try to figure out the "size" by computing the gap from one symbol to the next. This would not be correct in general, since a part of a section can belong to no visible symbol (padding, private globals). It was also really expensive, since we would walk every symbol to find the size of one. If a caller really wants this, it can sort all the symbols once and get all the gaps ("size") in O(n log n) instead of O(n^2). On MachO this also has the advantage of centralizing all the checks for an invalid n_sect. llvm-svn: 238028
OpenPOWER on IntegriCloud