- Jul 03, 2013
-
-
Ulrich Weigand authored
[PowerPC] Always use mfocrf if available When accessing just a single CR register, it is always preferable to use mfocrf instead of mfcr, if the former is available on the CPU. Current code makes that distinction in many, but not all places where a single CR register value is retrieved. One missing location is PPCRegisterInfo::lowerCRSpilling. To fix this and make this simpler in the future, this patch changes the bulk of the back-end to always assume mfocrf is available and simply generate it when needed. On machines that actually do not support mfocrf, the instruction is replaced by mfcr at the very end, in EmitInstruction. This has the additional benefit that we no longer need the MFCRpseud hack, since before EmitInstruction we always have a MFOCRF instruction pattern, which already models data flow as required. The patch also adds the MFOCRF8 version of the instruction, which was missing so far. Except for the PPCRegisterInfo::lowerCRSpilling case, no change in generated code intended. llvm-svn: 185556
-
Jordan Rose authored
This is important for preprocessing steps, which may output to stdout. Also, change ENV accesses using barewords to use string keys instead. PR16414 llvm-svn: 185555
-
Rafael Espindola authored
llvm-svn: 185554
-
Michael Sartain authored
Symbol prologue code checks if funciton lines up with symbol and uses function prologue code with line info if so. Differential Revision: http://llvm-reviews.chandlerc.com/D1082 llvm-svn: 185553
-
Rafael Espindola authored
It was only passing because 'grep andpd' was not finding any andpd, but we don't fail if part of a pipe fails. llvm-svn: 185552
-
Rafael Espindola authored
llvm-svn: 185551
-
Rafael Espindola authored
llvm-svn: 185550
-
Ed Maste authored
llvm-svn: 185549
-
Jordan Rose authored
Previously, the CMake build still tried to link clang against the static analyzer libraries, even if CLANG_ENABLE_STATIC_ANALYZER was off. Furthermore, clang-check depends on the analyzer, so it should be disabled (in both CMake and configure builds). In theory, clang-check could be made to conditionally include analyzer support (like clang itself), but for now this at least gets a CMake ALL_BUILD working. Patch by Stephen Kelly, modified by me. llvm-svn: 185548
-
Rafael Espindola authored
While there, use early returns to reduce nesting. llvm-svn: 185547
-
Rafael Espindola authored
This is a small compatibility improvement with gnu nm and makes llvm-nm more useful as a testing tool. llvm-svn: 185546
-
Bill Schmidt authored
When the -maltivec flag is present, altivec.h is auto-included for the compilation. This is not appropriate when the job action is to preprocess a file containing assembly code. So don't do that. I was unable to convert the test in the bug report into a regression test. The original symptom was exposed with: % touch x.S % ./bin/clang -target powerpc64-unknown-linux-gnu -maltivec -S -o - x.S I tried this test (and numerous variants) on a PPC64 system: ---------------------------------------------------------------------------- // RUN: touch %t // RUN: %clang -maltivec -S %t -o - | FileCheck %s // Verify that assembling an empty file does not auto-include altivec.h. // CHECK-NOT: static vector ---------------------------------------------------------------------------- However, this test passes for some reason even on a clang built without the fix. I'd be happy to add a test case but at this point I'm not able to figure one out, and I don't want to hold up the patch unnecessarily. Please let me know if you have ideas. Thanks, Bill llvm-svn: 185544
-
Serge Pavlov authored
llvm-svn: 185543
-
Ulrich Weigand authored
[PowerPC] Remove dead code from PPCDAGToDAGISel::SelectSETCC The subroutine getCRIdxForSetCC has a parameter "Other" and comment: If this returns with Other != -1, then the returned comparison is an or of two simpler comparisons. However for at least the last five years this routine has never returned a value of Other != -1; these cases are now handled differently to begin with. This patch removes the parameter and the code in SelectSETCC that attempted to handle the Other != -1 case. llvm-svn: 185541
-
Craig Topper authored
Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid specifying the vector size. llvm-svn: 185540
-
Craig Topper authored
Fix regular expression used by 'make update' to only look for 'I' and '?' at the start of svn info results and to check for spaces after 'I' instead of just after '?'. Previously it was able to match 'I' anywhere in the filenames of the svn info results instead of just files that where ignored or unknown to svn. This would cause 'make update' to infinitely recurse if a file was modified with I anywhere in its name since svn info would return a Path pointing to the llvm root for those files. llvm-svn: 185539
-
Evgeniy Stepanov authored
This changes behavior of -msan-poison-stack=0 flag from not poisoning stack allocations to actively unpoisoning them. llvm-svn: 185538
-
Rafael Espindola authored
Patch by Johannes Obermayr. llvm-svn: 185537
-
Sergey Matveev authored
llvm-svn: 185536
-
Edwin Vane authored
Add a new transform to replace uses of 'std::auto_ptr' by 'std::unique_ptr'. Copy-ctor and assign-operator are wrapped with a call to 'std::move()'. Note that until header modification is ready it is not that useful, that's why it's marked as (EXPERIMENTAL) in the command line description and a "Known Limitations" section is present in the transform documentation. Author: Guillaume Papin <guillaume.papin@epitech.eu> llvm-svn: 185535
-
Rui Ueyama authored
llvm-svn: 185534
-
Ulrich Weigand authored
[PowerPC] Make specialized AltiVec patterns isCodeGenOnly A couple of AltiVec patterns are just specialized forms of the generic instruction pattern, and should therefore be marked isCodeGenOnly to avoid confusing the asm parser: VCFSX_0, VCTUXS_0, VCFUX_0, VCTSXS_0, and V_SETALLONES. Noticed by inspection of the generated PPCGenAsmMatcher.inc. llvm-svn: 185533
-
Ulrich Weigand authored
[PowerPC] Support mtspr/mfspr in the asm parser This adds support for the generic forms of mtspr/mfspr for the asm parser. The compiler will continue to use the specialized patters for mtlr etc. since those are needed to correctly describe data flow. llvm-svn: 185532
-
Daniel Jasper authored
This fixes llvm.org/PR16514. llvm-svn: 185531
-
Daniel Jasper authored
In general, clang-format breaks after an operator if the LHS spans multiple lines. Otherwise, this can lead to confusing effects and effectively hide the operator precendence, e.g. in if (aaaaaaaaaaaaaa == bbbbbbbbbbbbbb && c) { ... This patch removes this rule for comparisons, if the LHS is not a binary expression itself as many users were wondering why clang-format inserts an unnecessary linebreak. Before: if (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) > 5) { ... After: if (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) > 5) { ... In the long run, we might: - Want to do this for other binary expressions as well. - Do this only if the RHS is short or even only if it is a literal. llvm-svn: 185530
-
Richard Sandiford authored
Add a mapping from register-based <INSN>R instructions to the corresponding memory-based <INSN>. Use it to cut down on the number of spill loads. Some instructions extend their operands from smaller fields, so this required a new TSFlags field to say how big the unextended operand is. This optimisation doesn't trigger for C(G)R and CL(G)R because in practice we always combine those instructions with a branch. Adding a test for every other case probably seems excessive, but it did catch a missed optimisation for DSGF (fixed in r185435). llvm-svn: 185529
-
Mihai Popa authored
1. it should accept only 4-byte aligned addresses 2. the maximum offset should be 1020 3. it should be encoded with the offset scaled by two bits llvm-svn: 185528
-
Tim Northover authored
Swift cores implement store barriers that are stronger than the ARM specification but weaker than general barriers. They are, in fact, just about enough to provide the ordering needed for atomic operations with release semantics. This patch makes use of that quirk. llvm-svn: 185527
-
Richard Sandiford authored
Rename Function->DispKey and PairType->DispSize. I'd originally used "Function" because I thought it might be useful for other InstMappings. However, it turns out that having two very similar instructions with the same Function makes it pretty useless for anything other than the displacement size key. Other InstMappings will want the key to be defined for only one instruction in the pair. No behavioural change intended. llvm-svn: 185526
-
Richard Sandiford authored
Get rid of some old code (and associated FIXME) for handling the caller-allocated register save area. No behavioural change intended. llvm-svn: 185525
-
Rui Ueyama authored
llvm-svn: 185524
-
Eric Christopher authored
llvm-svn: 185523
-
Pavel Labath authored
Summary: The analyzer incorrectly handled noreturn destructors which were hidden inside function calls. This happened because NoReturnFunctionChecker only listened for PostStmt events, which are not executed for destructor calls. I've changed it to listen to PostCall events, which should catch both cases. Reviewers: jordan_rose CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1056 llvm-svn: 185522
-
Rui Ueyama authored
The optional data directory header contains addresses to some atoms such as the import address table in data section. Such fields can naturally be set by relocation if we make the optional data driectory as an atom. Currently we assume that atoms are always in a section, so we can't create a file header with atoms. This patch separates section chunk from atom chunk, to allow atom-based file header. llvm-svn: 185521
-
Eric Christopher authored
llvm-svn: 185520
-
Richard Osborne authored
llvm-svn: 185519
-
Richard Osborne authored
Patch by Robert Lytton. llvm-svn: 185518
-
Rui Ueyama authored
llvm-svn: 185517
-
Rui Ueyama authored
A hint is an index of the export pointer table in a DLL, at which PE/COFF loader starts looking for a symbol name. The import library comes with hints and symbol pairs, and as long as hints are in sync with the actual symbol table in DLL, the symbols will be resolved quickly. So, we shouldn't ignore hints but propagate them to an output. llvm-svn: 185516
-
Rui Ueyama authored
llvm-svn: 185515
-