diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-08-21 23:08:09 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-08-21 23:08:09 +0000 |
| commit | 08e6373528ec26b0980edcb2d45be07bc7534afc (patch) | |
| tree | 9714d07ab0ec2af6f3e4e55b48fa46a91434b468 /lib/Target/PIC16/PIC16Passes/PIC16FrameOverlay.cpp | |
| parent | 3d153ff2f9b02dfed57352ab3102c5852d178b06 (diff) | |
| download | external_llvm-08e6373528ec26b0980edcb2d45be07bc7534afc.zip external_llvm-08e6373528ec26b0980edcb2d45be07bc7534afc.tar.gz external_llvm-08e6373528ec26b0980edcb2d45be07bc7534afc.tar.bz2 | |
revert 79631
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79685 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PIC16/PIC16Passes/PIC16FrameOverlay.cpp')
| -rw-r--r-- | lib/Target/PIC16/PIC16Passes/PIC16FrameOverlay.cpp | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/lib/Target/PIC16/PIC16Passes/PIC16FrameOverlay.cpp b/lib/Target/PIC16/PIC16Passes/PIC16FrameOverlay.cpp index cfeb97d..e69de29 100644 --- a/lib/Target/PIC16/PIC16Passes/PIC16FrameOverlay.cpp +++ b/lib/Target/PIC16/PIC16Passes/PIC16FrameOverlay.cpp @@ -1,69 +0,0 @@ -//===-- PIC16FrameOverlay.cpp - Implementation for PIC16 Frame Overlay===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the PIC16 Frame Overlay implementation. -// -//===----------------------------------------------------------------------===// - - -#include "llvm/Analysis/CallGraph.h" -#include "llvm/Pass.h" -#include "llvm/Module.h" -#include "llvm/Support/raw_ostream.h" -#include "PIC16.h" -#include "PIC16FrameOverlay.h" -#include <vector> -#include <iostream> -using namespace llvm; -using std::vector; -using std::string; - - -void PIC16FrameOverlay::getAnalysisUsage(AnalysisUsage &AU) const { - AU.setPreservesCFG(); - AU.addRequired<CallGraph>(); -} - -bool PIC16FrameOverlay::runOnModule(Module &M) { - CallGraph &CG = getAnalysis<CallGraph>(); - for (CallGraph::iterator it = CG.begin() ; it != CG.end(); it++) - { - // External calling node doesn't have any function associated - // with it - if (!it->first) - continue; - - if (it->second->size() == 0) { - if (PAN::isInterruptLineFunction(it->first)) - ColorFunction(it->second, PIC16Overlay::GREEN_IL); - else - ColorFunction(it->second, PIC16Overlay::GREEN); - } - } - return false; -} - -void PIC16FrameOverlay::ColorFunction(CallGraphNode *CGN, unsigned Color) { - switch (Color) { - case PIC16Overlay::GREEN: - case PIC16Overlay::GREEN_IL: { - Function *LeafFunct = CGN->getFunction(); - std::string Section = ""; - if (LeafFunct->hasSection()) { - Section = LeafFunct->getSection(); - Section.append(" "); - } - Section.append(PAN::getOverlayStr(Color)); - LeafFunct->setSection(Section); - break; - } - default: - assert( 0 && "Color not supported"); - } -} |
