- Oct 17, 2015
-
-
Xinliang David Li authored
Changing PGO data format layout can be a pain. Many different places need to be touched and kept in sync. Failing to do so usually results in errors very time consuming to debug. This file is intended to be the master file that defines the layout of the core runtime data structures. Currently only two structure is covered: Per function ProfData structure and the function record structure used in coverage mapping. No client code has been made yet, so this commit is NFC. llvm-svn: 250574
-
Chris Bieneman authored
[CMake] Cleaning up and generalizing the LLVMInstallSymlink script so that it can be used for libraries too. In order to resolve PR25059, we're going to need to be able to generate symlinks to libraries manually, so I need this code to be reusable. llvm-svn: 250573
-
Michael J. Spencer authored
Differential Revision: http://reviews.llvm.org/D13763 llvm-svn: 250572
-
Kostya Serebryany authored
llvm-svn: 250571
-
Benjamin Kramer authored
Breaks clang selfhost, see PR25222. This reverts commits r250527 and r250528. llvm-svn: 250570
-
Enrico Granata authored
llvm-svn: 250567
-
Rui Ueyama authored
If one file is MIPS64EL, all files are MIPS64EL, and vice versa. We do not have to look up MIPS-ness for each file. Currently we do not support 64-bit MIPS, so the config value is always false. llvm-svn: 250566
-
Kostya Serebryany authored
llvm-svn: 250565
-
Kostya Serebryany authored
[libFuzzer] When -test_single_input crashes the test it is not necessary to write crash-file because input is already known to the user. Patch by Mike Aizatsky llvm-svn: 250564
-
Hal Finkel authored
As pointed out by Rafael (with a further suggestion by Rui), the new Type parameter I added in r250555 is not needed. Remove it. llvm-svn: 250563
-
Xinliang David Li authored
This patch introduces a well defined header struct to represent raw profile header instead of using raw array. Previously the raw array is used in two different files and is very error prone when header structure is re-organized. This is a small cleanup with NFC. llvm-svn: 250561
-
Sanjay Patel authored
The motivation for this patch starts with PR20134: https://llvm.org/bugs/show_bug.cgi?id=20134 void foo(int *a, int i) { a[i] = a[i+1] + a[i+2]; } It seems better to produce this (14 bytes): movslq %esi, %rsi movl 0x4(%rdi,%rsi,4), %eax addl 0x8(%rdi,%rsi,4), %eax movl %eax, (%rdi,%rsi,4) Rather than this (22 bytes): leal 0x1(%rsi), %eax cltq leal 0x2(%rsi), %ecx movslq %ecx, %rcx movl (%rdi,%rcx,4), %ecx addl (%rdi,%rax,4), %ecx movslq %esi, %rax movl %ecx, (%rdi,%rax,4) The most basic problem (the first test case in the patch combines constants) should also be fixed in InstCombine, but it gets more complicated after that because we need to consider architecture and micro-architecture. For example, AArch64 may not see any benefit from the more general transform because the ISA solves the sexting in hardware. Some x86 chips may not want to replace 2 ADD insts with 1 LEA, and there's an attribute for that: FeatureSlowLEA. But I suspect that doesn't go far enough or maybe it's not getting used when it should; I'm also not sure if FeatureSlowLEA should also mean "slow complex addressing mode". I see no perf differences on test-suite with this change running on AMD Jaguar, but I see small code size improvements when building clang and the LLVM tools with the patched compiler. A more general solution to the sext(add nsw(x, C)) problem that works for multiple targets is available in CodeGenPrepare, but it may take quite a bit more work to get that to fire on all of the test cases that this patch takes care of. Differential Revision: http://reviews.llvm.org/D13757 llvm-svn: 250560
-
Davide Italiano authored
llvm-svn: 250559
-
Hal Finkel authored
When we have a R_PPC64_ADDR64 for a weak undef symbol, which thus resolves to 0, and we're creating a shared library, we need to make sure that it stays 0 (because code that conditionally calls the weak function tests for this). Unfortunately, we were creating a R_PPC64_RELATIVE for these relocation targets, making the address of the undefined weak symbol equal to the base address of the shared library (which is non-zero). In general, we should not be creating RelativeReloc relocs for undef weak symbols. llvm-svn: 250558
-
Jim Grosbach authored
Crashing is bad, m'kay? Fixing a 4 year old bug of my own creation. Adding the testcase now which I should have added then which would have long since caught this. The problem is that printMessage() will display the diagnostic but not set HadError to true, resulting in the assembler continuing on its way and trying to create relocations for things that may not allow them or otherwise get itself into trouble. Using the Error() helper function here rather than calling printMessage() directly resolves this. rdar://23133240 llvm-svn: 250557
-
Michael J. Spencer authored
llvm-svn: 250556
-
Hal Finkel authored
R_PPC64_TOC does not have an associated symbol, but does have a non-zero VA that target-specific code must compute using some non-trivial rule. We handled this as a special case in PPC64TargetInfo::relocateOne, where we knew to write this special address, but that did not work when creating shared libraries. The special TOC address needs to be the subject of a R_PPC64_RELATIVE relocation, and so we also need to know how to encode this special address in the addend of that relocation. Thus, some target-specific logic is necessary when creating R_PPC64_RELATIVE as well. To solve this problem, we teach getLocalRelTarget to handle R_PPC64_TOC as a special case. This allows us to remove the special case in PPC64TargetInfo::relocateOne (simplifying code there), and naturally allows the existing logic to do the right thing when creating associated R_PPC64_RELATIVE relocations for shared libraries. llvm-svn: 250555
-
Richard Smith authored
Refactor module lookup when looking up a header file, and wire through the requesting module. No functionality change. llvm-svn: 250554
-
Rui Ueyama authored
This code will be resurrected when we start working on PPC32. llvm-svn: 250553
-
Joseph Tremoulet authored
Summary: We now use the block for the catchpad itself, rather than its normal successor, as the funclet entry. Putting the normal successor in the map leads downstream funclet membership computations to erroneous results. Reviewers: majnemer, rnk Subscribers: rnk, llvm-commits Differential Revision: http://reviews.llvm.org/D13798 llvm-svn: 250552
-
Davide Italiano authored
Differential Revision: http://reviews.llvm.org/D13832 llvm-svn: 250551
-
Andrew Kaylor authored
Patch by Mitch Bodart Differential Revision: http://reviews.llvm.org/D13780 llvm-svn: 250550
-
Krzysztof Parzyszek authored
llvm-svn: 250549
-
Rafael Espindola authored
llvm-svn: 250548
-
Richard Barton authored
llvm-svn: 250547
-
Richard Barton authored
If you increase the number of diags of a particular type by one more than the number available you get the nice assert message. If you do it by two more than available you get the old non-helpful message. Combining the two makes sense I think. llvm-svn: 250546
-
David Majnemer authored
No functionality change is intended. llvm-svn: 250545
-
Rafael Espindola authored
llvm-svn: 250544
-
Krzysztof Parzyszek authored
llvm-svn: 250543
-
Krzysztof Parzyszek authored
llvm-svn: 250542
-
Ed Maste authored
Differential Revision: http://reviews.llvm.org/D13820 llvm-svn: 250541
-
Hal Finkel authored
When I initially implemented PPC64TargetInfo::isRelRelative, I included a fixed set of relative relocations, and made the default false. In retrospect, this seems unwise in two respects: First, most PPC64 relocations are relative (either to the base address, the TOC, etc.). Second, most relocation targets are not appropriate for R_PPC64_RELATIVE (which writes a 64-bit absolute address). Thus, back off, and include only those relocations for which we test (or soon will), and are obviously appropriate for R_PPC64_RELATIVE. llvm-svn: 250540
-
Diego Novillo authored
The number of samples collected at the head of a function only make sense for top-level functions (i.e., those actually called as opposed to being inlined inside another). Head samples essentially count the time spent inside the function's prologue. This clearly doesn't make sense for inlined functions, so we were always emitting 0 in those. llvm-svn: 250539
-
Eugene Zelenko authored
Differential Revision: http://reviews.llvm.org/D13684 llvm-svn: 250538
-
Matthias Gehre authored
Summary: This check flags all access to members of unions. Passing unions as a whole is not flagged. Reading from a union member assumes that member was the last one written, and writing to a union member assumes another member with a nontrivial destructor had its destructor called. This is fragile because it cannot generally be enforced to be safe in the language and so relies on programmer discipline to get it right. This rule is part of the "Type safety" profile of the C++ Core Guidelines, see https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#-type7-avoid-accessing-members-of-raw-unions-prefer-variant-instead Reviewers: alexfh, sbenza, bkramer, aaron.ballman Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D13784 llvm-svn: 250537
-
James Y Knight authored
Also move the addLibStdCXXIncludePaths helper function from Linux to Generic_GCC. llvm-svn: 250536
-
JF Bastien authored
Summary: The syntax has changed a bit recently. Reviewers: binji Subscribers: llvm-commits, jfb, sunfish, dschuff Differential Revision: http://reviews.llvm.org/D13821 llvm-svn: 250535
-
Joseph Tremoulet authored
Summary: When a cleanup's cleanupendpad or cleanupret targets a catchendpad, stop trying to propagate the cleanup's parent's color to the catchendpad, since what's needed is the cleanup's grandparent's color and the catchendpad will get that color from the catchpad linkage already. We already had this exclusion for invokes, but were missing it for cleanupendpad/cleanupret. Also add a missing line that tags cleanupendpads' states in the EHPadStateMap, without with lowering invokes that target cleanupendpads which unwind to other handlers (and so don't have the -1 state) will fail. This fixes the reduced IR repro in PR25163. Reviewers: majnemer, andrew.w.kaylor, rnk Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13797 llvm-svn: 250534
-
Zachary Turner authored
Mostly this is just converting some print statements to print functions. llvm-svn: 250533
-
Zachary Turner authored
llvm-svn: 250532
-