summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/PseudoSourceValue.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [llvm] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-151-3/+3
| | | | | | | | Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. llvm-svn: 369013
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [PSV] Update API to be able to use TargetCustom without UB.Marcello Maggioni2018-08-201-2/+2
| | | | | | | | | | | getTargetCustom() requires values for "Kind" in the constructor that are not in the PSVKind enum. Passing a value that is not inside an enum as an argument to a constructor of the type of the enum is UB. Changing to the underlying type of the enum would solve the UB Differential Revision: https://reviews.llvm.org/D50909 llvm-svn: 340200
* Target/TargetInstrInfo.h -> CodeGen/TargetInstrInfo.h to match layeringDavid Blaikie2017-11-081-1/+1
| | | | | | | | This header includes CodeGen headers, and is not, itself, included by any Target headers, so move it into CodeGen to match the layering of its implementation. llvm-svn: 317647
* Add AddresSpace to PseudoSourceValue.Jan Sjodin2017-09-141-17/+28
| | | | | | Differential Revision: https://reviews.llvm.org/D35089 llvm-svn: 313297
* Fix crashing on TargetCustom PseudoSourceValuesMatt Arsenault2017-03-281-1/+4
| | | | | | Default to something more reasonable if printCustom isn't implemented. llvm-svn: 298941
* [NFC] Header cleanupMehdi Amini2016-04-181-4/+1
| | | | | | | | | | | | | | Removed some unused headers, replaced some headers with forward class declarations. Found using simple scripts like this one: clear && ack --cpp -l '#include "llvm/ADT/IndexedMap.h"' | xargs grep -L 'IndexedMap[<]' | xargs grep -n --color=auto 'IndexedMap' Patch by Eugene Kosov <claprix@yandex.ru> Differential Revision: http://reviews.llvm.org/D19219 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266595
* Refactor: Simplify boolean conditional return statements in lib/CodeGen.Rafael Espindola2015-10-241-3/+1
| | | | | | Patch by Richard. llvm-svn: 251213
* PseudoSourceValue: Transform the mips subclass to target independent subclassesAlex Lorenz2015-08-111-1/+42
| | | | | | | | | | | | This commit transforms the mips-specific 'MipsCallEntry' subclass of the 'PseudoSourceValue' class into two, target-independent subclasses named 'GlobalValuePseudoSourceValue' and 'ExternalSymbolPseudoSourceValue'. This change makes it easier to serialize the pseudo source values by removing target-specific pseudo source values. Reviewers: Akira Hatanaka llvm-svn: 244698
* PseudoSourceValue: Replace global manager with a manager in a machine function.Alex Lorenz2015-08-111-47/+27
| | | | | | | | | | | | | | | | | | | | | | This commit removes the global manager variable which is responsible for storing and allocating pseudo source values and instead it introduces a new manager class named 'PseudoSourceValueManager'. Machine functions now own an instance of the pseudo source value manager class. This commit also modifies the 'get...' methods in the 'MachinePointerInfo' class to construct pseudo source values using the instance of the pseudo source value manager object from the machine function. This commit updates calls to the 'get...' methods from the 'MachinePointerInfo' class in a lot of different files because those calls now need to pass in a reference to a machine function to those methods. This change will make it easier to serialize pseudo source values as it will enable me to transform the mips specific MipsCallEntry PseudoSourceValue subclass into two target independent subclasses. Reviewers: Akira Hatanaka llvm-svn: 244693
* PseudoSourceValue: Introduce a 'PSVKind' enumerator.Alex Lorenz2015-08-111-17/+19
| | | | | | | | | | | | | | This commit introduces a new enumerator named 'PSVKind' in the 'PseudoSourceValue' class. This enumerator is now used to distinguish between the various kinds of pseudo source values. This change is done in preparation for the changes to the pseudo source value object management and to the PseudoSourceValue's class hierarchy - the next two PseudoSourceValue commits will get rid of the global variable that manages the pseudo source values and the mips specific MipsCallEntry subclass. Reviewers: Akira Hatanaka llvm-svn: 244687
* PseudoSourceValue: Update comments and fix lowercase variable names. NFC.Alex Lorenz2015-08-111-1/+1
| | | | | | | | | | | This commit updates the documentation comments in PseudoSourceValue.cpp and PseudoSourceValue.h based on the LLVM's documentation style. It also fixes several instances of variable names that started with a lowercase letter. This change is done in preparation for the changes to the pseudo source value object management and to the PseudoSourceValue's class hierarchy. llvm-svn: 244686
* Reformat PseudoSourceValue.cpp and PseudoSourceValue.h. NFC.Alex Lorenz2015-08-111-29/+26
| | | | | | | | | This commit reformats the files lib/CodeGen/PseudoSourceValue.cpp and include/llvm/CodeGen/PseudoSourceValue.h using clang-format. This change is done in preparation for the changes to the pseudo source value object management and to the PseudoSourceValue's class hierarchy. llvm-svn: 244685
* Make isAliased property for fixed-offset stack objects adjustableHal Finkel2014-08-161-6/+2
| | | | | | | | | | | | | | | | | | | | We used to assume that any fixed-offset stack object was not aliased. This meant that no IR value could point to the memory contained in such an object. This is a reasonable default, but is not a universally-correct target-independent fact. For example, on PowerPC (both Darwin and non-Darwin), some byval arguments are allocated at fixed offsets by the ABI. These, however, certainly can be pointed to by IR values. This change moves the 'isAliased' logic out of FixedStackPseudoSourceValue and into MFI, and allows the isAliased property to be overridden for fixed-offset objects. This will be used by an upcoming commit to the PowerPC backend to fix PR20280. No functionality change intended (the behavior of FixedStackPseudoSourceValue::isAliased has been made more conservative for callers that don't pass an MFI object, but I don't see any in-tree callers that do that). llvm-svn: 215794
* Break PseudoSourceValue out of the Value hierarchy. It is now the root of ↵Nick Lewycky2014-04-151-7/+3
| | | | | | its own tree containing FixedStackPseudoSourceValue (which you can use isa/dyn_cast on) and MipsCallEntry (which you can't). Anything that needs to use either a PseudoSourceValue* and Value* is strongly encouraged to use a MachinePointerInfo instead. llvm-svn: 206255
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-021-2/+2
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-2/+2
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* More dead code removal (using -Wunreachable-code)David Blaikie2012-01-201-2/+0
| | | | llvm-svn: 148578
* Merge System into Support.Michael J. Spencer2010-11-291-1/+1
| | | | llvm-svn: 120298
* Fix memcheck-found leaks: one false positive from using new[], and one trueJeffrey Yasskin2010-03-041-9/+28
| | | | | | positive where pointers would be leaked on llvm_shutdown. llvm-svn: 97759
* Do some cleanups suggested by Chris.David Greene2009-11-121-0/+4
| | | | llvm-svn: 87034
* Make FixedStackPseudoSourceValue a first-class PseudoSourceValue byDavid Greene2009-11-121-23/+2
| | | | | | | | making it visible to clients and adding LLVM-style cast capability. This will be used by AsmPrinter to determine when to emit spill comments for an instruction. llvm-svn: 87019
* Add PseudoSourceValue::mayAlias. It returns true if the object can ever ↵Evan Cheng2009-11-011-0/+17
| | | | | | alias any LLVM IR value. llvm-svn: 85762
* pseudosourcevalue is also still using getGlobalContext(), so it isn'tChris Lattner2009-10-271-0/+1
| | | | | | thread safe either. llvm-svn: 85253
* Remove includes of Support/Compiler.h that are no longer needed after theNick Lewycky2009-10-251-1/+0
| | | | | | VISIBILITY_HIDDEN removal. llvm-svn: 85043
* Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.Nick Lewycky2009-10-251-2/+1
| | | | | | | Chris claims we should never have visibility_hidden inside any .cpp file but that's still not true even after this commit. llvm-svn: 85042
* Spill slots cannot alias.Evan Cheng2009-10-181-4/+7
| | | | llvm-svn: 84432
* -Revert parts of 84326 and 84411. Distinquishing between fixed and non-fixedEvan Cheng2009-10-181-0/+19
| | | | | | | | | | | stack slots and giving them different PseudoSourceValue's did not fix the problem of post-alloc scheduling miscompiling llvm itself. - Apply Dan's conservative workaround by assuming any non fixed stack slots can alias other memory locations. This means a load from spill slot #1 cannot move above a store of spill slot #2. - Enable post-alloc scheduling for x86 at optimization leverl Default and above. llvm-svn: 84424
* Revert 84315 for now. Re-thinking the patch.Evan Cheng2009-10-171-11/+8
| | | | llvm-svn: 84321
* Rename getFixedStack to getStackObject. The stack objects represented are notEvan Cheng2009-10-171-8/+11
| | | | | | necessarily fixed. Only those will negative frame indices are "fixed." llvm-svn: 84315
* Introduce and use convenience methods for getting pointer typesDuncan Sands2009-10-061-1/+1
| | | | | | | where the element is of a basic builtin type. For example, to get an i8* use getInt8PtrTy. llvm-svn: 83379
* Give MachineMemOperand an operator<<, factoring out code fromDan Gohman2009-09-231-7/+3
| | | | | | | | | | | | two different places for printing MachineMemOperands. Drop the virtual from Value::dump and instead give Value a protected virtual hook that can be overridden by subclasses to implement custom printing. This lets printing be more consistent, and simplifies printing of PseudoSourceValue values. llvm-svn: 82599
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-1/+6
| | | | llvm-svn: 78948
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-1/+1
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-1/+2
| | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
* Now that errs() is properly non-buffered, there's no need toDan Gohman2009-03-231-1/+1
| | | | | | explicitly flush it. llvm-svn: 67526
* Have PseudoSourceValue override Value::dump, so that it worksDan Gohman2008-12-031-0/+4
| | | | | | | on PseudoSourceValue values. This also fixes a FIXME in lib/VMCode/AsmWriter.cpp. llvm-svn: 60507
* Remove the std::ostream form of PseudoSourceValue's print,Dan Gohman2008-08-271-3/+0
| | | | | | which isn't needed anymore. llvm-svn: 55419
* simplify PseudoSourceValue printing a bit. Unnest all of ↵Chris Lattner2008-08-241-44/+41
| | | | | | PseudoSourceValue.cpp from the llvm namespace. llvm-svn: 55293
* Print PseudoSourceValue.Evan Cheng2008-08-241-0/+7
| | | | llvm-svn: 55291
* Enable rematerialization of constants using ↵Dan Gohman2008-07-251-0/+20
| | | | | | | | | | AliasAnalysis::pointsToConstantMemory, and knowledge of PseudoSourceValues. This unfortunately isn't sufficient to allow constants to be rematerialized in PIC mode -- the extra indirection is a complication. llvm-svn: 54000
* Fix edito in the PseudoSourceValue name list.Dan Gohman2008-07-141-1/+1
| | | | llvm-svn: 53562
* Include a frame index in the "fixed stack" pseudo source valueDan Gohman2008-07-111-8/+29
| | | | | | | instead of using the frame index for the SVOffset, which was inconsistent. llvm-svn: 53486
* A quick nm audit turned up several fixed tables and objects that wereDan Gohman2008-03-251-1/+1
| | | | | | | marked read-write. Use const so that they can be allocated in a read-only segment. llvm-svn: 48800
* From Chris' review: fix 80 column violationsDan Gohman2008-02-111-5/+10
| | | | llvm-svn: 46961
* Follow Chris' suggestion; change the PseudoSourceValue accessorsDan Gohman2008-02-071-5/+5
| | | | | | | to return pointers instead of references, since this is always what is needed. llvm-svn: 46857
* Re-apply the memory operand changes, with a fix for the staticDan Gohman2008-02-061-0/+41
| | | | | | | | initializer problem, a minor tweak to the way the DAGISelEmitter finds load/store nodes, and a renaming of the new PseudoSourceValue objects. llvm-svn: 46827
* Revert 46556 and 46585. Dan please fix the PseudoSourceValue problem and ↵Evan Cheng2008-01-311-33/+0
| | | | | | re-commit. llvm-svn: 46623
* Add a new PseudoSourceValue class, which will be used to help trackDan Gohman2008-01-301-0/+33
memory reference information in the backend. Most of this was written by Florian Brander, cleanup and updating to TOT by me. llvm-svn: 46556
OpenPOWER on IntegriCloud