Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
llvm-epi-0.8
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Roger Ferrer
llvm-epi-0.8
Commits
525e3af3
Commit
525e3af3
authored
22 years ago
by
Chris Lattner
Browse files
Options
Downloads
Patches
Plain Diff
* Frame & const pool info is no longer directly in MachineFunction
llvm-svn: 5173
parent
d2a67df7
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
llvm/lib/Target/Sparc/Sparc.cpp
+10
-8
10 additions, 8 deletions
llvm/lib/Target/Sparc/Sparc.cpp
with
10 additions
and
8 deletions
llvm/lib/Target/Sparc/Sparc.cpp
+
10
−
8
View file @
525e3af3
...
...
@@ -11,6 +11,7 @@
#include
"llvm/PassManager.h"
#include
"llvm/Transforms/Scalar.h"
#include
"llvm/CodeGen/MachineFunction.h"
#include
"llvm/CodeGen/MachineFunctionInfo.h"
#include
"llvm/CodeGen/PreSelection.h"
#include
"llvm/CodeGen/StackSlots.h"
#include
"llvm/CodeGen/PeepholeOpts.h"
...
...
@@ -59,7 +60,6 @@ TargetMachine *allocateSparcTargetMachine() { return new UltraSparc(); }
//---------------------------------------------------------------------------
// class UltraSparcFrameInfo
//
// Purpose:
// Interface to stack frame layout info for the UltraSPARC.
// Starting offsets for each area of the stack frame are aligned at
// a multiple of getStackFrameSizeAlignment().
...
...
@@ -77,10 +77,11 @@ int
UltraSparcFrameInfo
::
getRegSpillAreaOffset
(
MachineFunction
&
mcInfo
,
bool
&
pos
)
const
{
mcInfo
.
freezeAutomaticVarsArea
();
// ensure no more auto vars are added
// ensure no more auto vars are added
mcInfo
.
getInfo
()
->
freezeAutomaticVarsArea
();
pos
=
false
;
// static stack area grows downwards
unsigned
int
autoVarsSize
=
mcInfo
.
getAutomaticVarsSize
();
unsigned
autoVarsSize
=
mcInfo
.
getInfo
()
->
getAutomaticVarsSize
();
return
StaticAreaOffsetFromFP
-
autoVarsSize
;
}
...
...
@@ -88,12 +89,13 @@ int
UltraSparcFrameInfo
::
getTmpAreaOffset
(
MachineFunction
&
mcInfo
,
bool
&
pos
)
const
{
mcInfo
.
freezeAutomaticVarsArea
();
// ensure no more auto vars are added
mcInfo
.
freezeSpillsArea
();
// ensure no more spill slots are added
MachineFunctionInfo
*
MFI
=
mcInfo
.
getInfo
();
MFI
->
freezeAutomaticVarsArea
();
// ensure no more auto vars are added
MFI
->
freezeSpillsArea
();
// ensure no more spill slots are added
pos
=
false
;
// static stack area grows downwards
unsigned
int
autoVarsSize
=
mcInfo
.
getAutomaticVarsSize
();
unsigned
int
spillAreaSize
=
mcInfo
.
getRegSpillsSize
();
unsigned
autoVarsSize
=
MFI
->
getAutomaticVarsSize
();
unsigned
spillAreaSize
=
MFI
->
getRegSpillsSize
();
int
offset
=
autoVarsSize
+
spillAreaSize
;
return
StaticAreaOffsetFromFP
-
offset
;
}
...
...
@@ -107,7 +109,7 @@ UltraSparcFrameInfo::getDynamicAreaOffset(MachineFunction& mcInfo,
// during calls and traps, so they are shifted downwards on each
// dynamic-size alloca.
pos
=
false
;
unsigned
int
optArgsSize
=
mcInfo
.
getMaxOptionalArgsSize
();
unsigned
optArgsSize
=
mcInfo
.
getInfo
()
->
getMaxOptionalArgsSize
();
if
(
int
extra
=
optArgsSize
%
getStackFrameSizeAlignment
())
optArgsSize
+=
(
getStackFrameSizeAlignment
()
-
extra
);
int
offset
=
optArgsSize
+
FirstOptionalOutgoingArgOffsetFromSP
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment