summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* Fix missing words in sentenceMatt Arsenault2014-06-231-3/+3
| | | | llvm-svn: 211511
* Use helper functionMatt Arsenault2014-06-231-7/+2
| | | | llvm-svn: 211510
* Alphabetize forward declarationsMatt Arsenault2014-06-231-2/+2
| | | | llvm-svn: 211509
* Delete utils/FileUpdate.Rafael Espindola2014-06-236-117/+2
| | | | | | It is unused and it looks like it was never used. llvm-svn: 211508
* Support: Extract ScaledNumbers::compare()Duncan P. N. Exon Smith2014-06-234-35/+87
| | | | llvm-svn: 211507
* Allow using .cfi_startproc without a leading symbol.Rafael Espindola2014-06-236-32/+18
| | | | | | This is possible now that we don't produce .eh symbols. This fixes pr19430. llvm-svn: 211502
* clang-format initializer to reduce noise in another patch.Rafael Espindola2014-06-231-3/+4
| | | | llvm-svn: 211501
* Stop producing func.eh symbols on Darwin.Rafael Espindola2014-06-235-44/+1
| | | | | | | | | | According Nick Kledzik (http://llvm.org/bugs/show_bug.cgi?id=19430#c2): "... mach-o no longer needs names in the __eh_frame section (and has not for years)." Iain Sandoe confirms it is also unnecessary for their old darwin support. llvm-svn: 211500
* Remove a temporary hack.Rafael Espindola2014-06-231-10/+0
| | | | | | | Amusingly this survived a lot longer than the CFI transition. We don't even support non-cfi assemblers any more. llvm-svn: 211498
* [PowerPC] Refactor getMinCallFrameSize / getMinCallArgumentsSizeUlrich Weigand2014-06-234-51/+20
| | | | | | | | | | | | | | | | | | | | As of r211495, the only remaining users of getMinCallFrameSize are in core ABI code (LowerFormalParameter / LowerCall). This is actually a good thing, since the details of the parameter save area are ABI specific. With the new ELFv2 ABI in particular, the rules defining the size of the save area will become significantly more complex, so it wouldn't make sense to implement those outside ABI code that has all required information. In preparation, this patch eliminates the getMinCallFrameSize (and associated getMinCallArgumentsSize) routines, and inlines them into all callers. Note that since nearly all call arguments are constant, this allows simplifying the inlined copies to a single line everywhere. No change in generate code expected. llvm-svn: 211497
* [PowerPC] Allow stack frames without parameter save areaUlrich Weigand2014-06-236-24/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PPCFrameLowering::determineFrameLayout routine currently ensures that every function that allocates a stack frame provides space for the parameter save area (via PPCFrameLowering::getMinCallFrameSize). This is actually not necessary. There may be functions that never call another routine but still allocate a frame; those do not require the parameter save area. In the future, with the ELFv2 ABI, even some routines that do call other functions do not need to allocate the parameter save area. While it is not a bug to allocate the parameter area when it is not needed, it is better to avoid it to save stack space. Note that when any particular function call requires the parameter save area, this space will already have been included by ABI code in the size the CALLSEQ_START insn is annotated with, and therefore included in the size returned by MFI->getMaxCallFrameSize(). This means that determineFrameLayout simply does not need to care about the parameter save area. (It still needs to ensure that every frame provides the linkage area.) This is implemented by this patch. Note that this exposed a bug in the new fast-isel code where the parameter area was *not* included in the CALLSEQ_START size; this is also fixed. A couple of test cases needed to be adapted for the new (smaller) stack frame size those tests now see. llvm-svn: 211495
* [PowerPC] Fix IsDarwin arg in PPCFrameLowering:: callsUlrich Weigand2014-06-231-5/+5
| | | | | | | | | | | | | | | | As remarked in the commit message to r211493, in several places throughout the 64-bit SVR4 ABI code there are calls to PPCFrameLowering::getLinkageSize and getMinCallFrameSize using an incorrect IsDarwin argument of "true". (Some of those were made explicit by the above refactoring patch, others have been there all along.) This patch fixes those places to pass "false" for IsDarwin. No change in generated code expected. llvm-svn: 211494
* [PowerPC] Refactor setMinReservedArea and CalculateParameterAndLinkageAreaSizeUlrich Weigand2014-06-232-127/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PPCISelLowering.cpp routines PPCTargetLowering::setMinReservedArea and CalculateParameterAndLinkageAreaSize are currently used as subroutines from both 64-bit SVR4 and Darwin ABI code. However, the two ABIs are already quite different w.r.t. AltiVec conventions, and they will become more different when the ELFv2 ABI is supported. Also, in general it seems better to disentangle ABI support routines for different ABIs to avoid accidentally affecting one ABI when intending to change only the other. (Actually, the current code strictly speaking already contains a bug: these routines call PPCFrameLowering::getMinCallFrameSize and PPCFrameLowering::getLinkageSize with the IsDarwin parameter set to "true" even on 64-bit SVR4. This bug currently has no adverse effect since those routines always return the same for 64-bit SVR4 and 64-bit Darwin, but it still seems wrong ... I'll fix this in a follow-up commit shortly.) To remove this code sharing, I'm simply inlining both routines into all call sites (there are just two each, one for 64-bit SVR4 and one for Darwin), and simplifying due to constant parameters where possible. A small piece of code that *does* make sense to share is refactored into the new routine EnsureStackAlignment, now also called from 32-bit SVR4 ABI code. No change in generated code is expected. llvm-svn: 211493
* [PowerPC] Fix on-stack AltiVec arguments with 64-bit SVR4Ulrich Weigand2014-06-232-44/+54
| | | | | | | | | | | | | | | | | | Current 64-bit SVR4 code seems to have some remnants of Darwin code in AltiVec argument handing. This had the effect that AltiVec arguments (or subsequent arguments) were not correctly placed in the parameter area in some cases. The correct behaviour with the 64-bit SVR4 ABI is: - All AltiVec arguments take up space in the parameter area, just like any other arguments, whether vararg or not. - They are always 16-byte aligned, skipping a parameter area doubleword (and the associated GPR, if any), if necessary. This patch implements the correct behaviour and adds a test case. (Verified against GCC behaviour via the ABI compat test suite.) llvm-svn: 211492
* ARM: mark UBFX as not allowing PC.Tim Northover2014-06-232-2/+20
| | | | | | | | | Strictly, it's unpredictable. But we don't quite model that yet and an error is better than ignoring the issue. This one somehow got left out before though. rdar://problem/15997748 llvm-svn: 211490
* MC: Cleanup parseMSInlineAsmDavid Majnemer2014-06-231-16/+13
| | | | | | | | | Utilize range based for-loops to simplify some code. Use insert() instead of a loop for simplicity/efficiency. No functionality change. llvm-svn: 211486
* MC: adjust text section flags for WoASaleem Abdulrasool2014-06-224-9/+78
| | | | | | | | | | | | | | | | | | | | | | | Correct the section flags for code built for Windows on ARM with `-ffunction-sections`. Windows on ARM uses solely Thumb-2 instructions, and indicates that the function is thumb by placing it in a text section that has IMAGE_SCN_MEM_16BIT flag set. When we encounter a .section directive, a new section is constructed. This may be a text segment. In order to identify that we need the additional flag, expose the target triple through the ObjectFileInfo as this information is lost otherwise. Since any modern ARM targeting environment on Windows would be Thumb-2 (Windows ARM NT or Windows Embedded Compact), introducing a new flag to indicate the section attribute seems to be a bit overkill. Simply depend on the target triple. Since there is one location that this information is currently needed, creating a target specific assembly parser and delegating the parsing of section switches also feels a bit heavy handed. If it turns out that this information ends up changing additional behaviour, then it may be worth considering that alternative. llvm-svn: 211481
* Revert r211399, "Generate native unwind info on Win64"NAKAMURA Takumi2014-06-2219-645/+228
| | | | | | It broke Legacy JIT Tests on x86_64-{mingw32|msvc}, aka Windows x64. llvm-svn: 211480
* R600: Use LowerSDIVREM for i64 node replaceJan Vesely2014-06-223-92/+120
| | | | | | | | v2: move div/rem node replacement to R600ISelLowering make lowerSDIVREM protected Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 211478
* R600: Implement custom SDIVREM.Jan Vesely2014-06-222-4/+44
| | | | | | | | | | Instead of separate SDIV/SREM. SDIV used UDIV which in turn used UDIVREM anyway. SREM used SDIV(UDIV->UDIVREM)+MUL+SUB, using UDIVREM directly is more efficient. v2: Don't use all caps names Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 211477
* R600: Add udivrem testJan Vesely2014-06-221-0/+358
| | | | | | | | | v2: move < %s to the end of the line space after ; add v4i32 test Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 211476
* Fix PR20087 by using the source index when changing the vector loadFilipe Cabecinhas2014-06-222-2/+13
| | | | llvm-svn: 211472
* Introduce a Lit feature "debug_frame" and apply it to ↵NAKAMURA Takumi2014-06-222-0/+7
| | | | | | | | llvm/test/MC/ELF/cfi-version.ll. .debug_frame is not emitted for targeting Windows x64. llvm-svn: 211466
* Add a description to the test from r211433 explaining why it's written that way.Benjamin Kramer2014-06-221-0/+6
| | | | llvm-svn: 211465
* LoopVectorizer: Fix a dominance issueArnold Schwaighofer2014-06-222-8/+51
| | | | | | | The induction variables start value needs to be defined before we branch (overflow check) to the scalar preheader where we used it. llvm-svn: 211460
* MergeFunctions Pass, removed DenseMap helpers.Stepan Dyatkovskiy2014-06-221-104/+0
| | | | | | | | | | | Patch removes rest part of code related to old implementation. This patch belongs to patch series that improves MergeFunctions performance time from O(N*N) to O(N*log(N)). This one was the final patch. llvm-svn: 211457
* MergeFunctions Pass, updated header comments.Stepan Dyatkovskiy2014-06-221-9/+47
| | | | | | | | | | Added short description for new comparison algorithm, that introduces total ordering among functions set. This patch belongs to patch series that improves MergeFunctions performance time from O(N*N) to O(N*log(N)). llvm-svn: 211456
* Report error for non-zero data in .bssWeiming Zhao2014-06-222-2/+17
| | | | | | | | | | | | User may initialize a var with non-zero value and specify .bss section. E.g. : int a __attribute__((section(".bss"))) = 2; This patch converts an assertion to error report for better user experience. Differential Revision: http://reviews.llvm.org/D4199 llvm-svn: 211455
* MergeFunctions Pass, FnSet has been replaced with FnTree.Stepan Dyatkovskiy2014-06-211-37/+49
| | | | | | | | | | | | | | | | Patch activates new implementation. So from now, merging process should take time O(N*log(N)). Where N size of module (we are free to measure it in functions or in instructions). Internally FnTree represents binary tree. So every lookup operation takes O(log(N)) time. It is still not the last patch in series, we also have to clean-up pass from old code, and update pass comments. This patch belongs to patch series that improves MergeFunctions performance time from O(N*N) to O(N*log(N)). llvm-svn: 211445
* MergeFunctions Pass, removed unused methods from old implementation.Stepan Dyatkovskiy2014-06-211-21/+0
| | | | | | | | | | | | | Patch removed next old FunctionComparator methods: * enumerate * isEquivalentOperation * isEquivalentGEP * isEquivalentType This patch belongs to patch series that improves MergeFunctions performance time from O(N*N) to O(N*log(N)). llvm-svn: 211444
* MergeFunctions, doSanityCheck: fixed body comments.Stepan Dyatkovskiy2014-06-211-7/+5
| | | | llvm-svn: 211443
* MergeFunctions Pass, introduced sanity check, that checks order relation,Stepan Dyatkovskiy2014-06-211-0/+88
| | | | | | | | | introduced among functions set. This patch belongs to patch series that improves MergeFunctions performance time from O(N*N) to O(N*log(N)). llvm-svn: 211442
* MergeFunctions Pass, introduced total ordering among top-level comparisonStepan Dyatkovskiy2014-06-211-79/+94
| | | | | | | | | | | | | methods. Patch changes return type of FunctionComparator::compare() and FunctionComparator::compare(const BasicBlock*, const BasicBlock*) methods from bool (equal or not) to {-1, 0, 1} (less, equal, great). This patch belongs to patch series that improves MergeFunctions performance time from O(N*N) to O(N*log(N)). llvm-svn: 211437
* LoopUnrollRuntime: Check for overflow in the trip count calculation.Benjamin Kramer2014-06-212-11/+18
| | | | | | Fixes PR19823. llvm-svn: 211436
* Legalizer: Add support for splitting insert_subvectors.Benjamin Kramer2014-06-213-0/+72
| | | | | | | | | We handle this by spilling the whole thing to the stack and doing the insertion as a store. PR19492. This happens in real code because the vectorizer creates v2i128 when AVX is enabled. llvm-svn: 211435
* SCEVExpander: Fold constant PHIs harder. The logic below only understands ↵Benjamin Kramer2014-06-212-1/+53
| | | | | | | | proper IVs. PR20093. llvm-svn: 211433
* Add back functionality removed in r210497.Richard Trieu2014-06-217-16/+34
| | | | | | Instead of asserting, output a message stating that a null pointer was found. llvm-svn: 211430
* [X86] Add ISel patterns to select SSE3/AVX ADDSUB instructions.Andrea Di Biagio2014-06-212-0/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds ISel patterns to select SSE3/AVX ADDSUB instructions from a sequence of "vadd + vsub + blend". Example: /// typedef float float4 __attribute__((ext_vector_type(4))); float4 foo(float4 A, float4 B) { float4 X = A - B; float4 Y = A + B; return (float4){X[0], Y[1], X[2], Y[3]}; } /// Before this patch, (with flag -mcpu=corei7) llc produced the following assembly sequence: movaps %xmm0, %xmm2 addps %xmm1, %xmm2 subps %xmm1, %xmm0 blendps $10, %xmm2, %xmm0 With this patch, we now get a single addsubps %xmm1, %xmm0 llvm-svn: 211427
* Fix the MinGW builder. Apparently std::call_once andZachary Turner2014-06-211-17/+10
| | | | | | | | std::recursive_mutex are not available on MinGW and breaks the builder. Revert to using a function local static and sys::Mutex just to get the tree green until we figure out a better solution. llvm-svn: 211424
* Always use a temp symbol for CIE.Rafael Espindola2014-06-202-6/+7
| | | | | | Fixes pr19185. llvm-svn: 211423
* Use compact unwind for the iOS simulator.Rafael Espindola2014-06-202-0/+6
| | | | | | Another step in fixing pr19185. llvm-svn: 211416
* Use a helper function and clang-format.Rafael Espindola2014-06-201-6/+19
| | | | | | No functionality change. llvm-svn: 211415
* Support: ScaledNumber: Fix inconsistent test namesDuncan P. N. Exon Smith2014-06-202-7/+6
| | | | llvm-svn: 211414
* Support: Write ScaledNumbers::getLg{,Floor,Ceiling}()Duncan P. N. Exon Smith2014-06-203-33/+157
| | | | llvm-svn: 211413
* Delete dead code.Rafael Espindola2014-06-201-17/+8
| | | | | | The compact unwind info is only used by code that knows it is supported. llvm-svn: 211412
* Support: Write ScaledNumber::getQuotient() and getProduct()Duncan P. N. Exon Smith2014-06-206-136/+314
| | | | llvm-svn: 211409
* Support: Cleanup ScaledNumber::getAdjusted() docDuncan P. N. Exon Smith2014-06-201-4/+1
| | | | llvm-svn: 211407
* Support: Mark end of namespacesDuncan P. N. Exon Smith2014-06-202-3/+5
| | | | | | This convinces clang-format to leave a newline. llvm-svn: 211406
* Fix some double printing of filenames for archives in llvm-nm whenKevin Enderby2014-06-202-12/+17
| | | | | | | | the tool is given multiple files. Also fix the same issue with Mach-O universal files. And fix the newline spacing to separate the output in these cases. llvm-svn: 211405
* Don't produce eh_frame relocations when targeting the IOS simulator.Rafael Espindola2014-06-202-2/+4
| | | | | | First step for fixing pr19185. llvm-svn: 211404
OpenPOWER on IntegriCloud