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
6486974e
Commit
6486974e
authored
18 years ago
by
Evan Cheng
Browse files
Options
Downloads
Patches
Plain Diff
More flexible TargetLowering LSR hooks for testing whether an immediate is
a legal target address immediate or scale. llvm-svn: 35071
parent
57f261b1
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/include/llvm/Target/TargetLowering.h
+10
-20
10 additions, 20 deletions
llvm/include/llvm/Target/TargetLowering.h
with
10 additions
and
20 deletions
llvm/include/llvm/Target/TargetLowering.h
+
10
−
20
View file @
6486974e
...
...
@@ -856,18 +856,18 @@ public:
// Loop Strength Reduction hooks
//
/// isLegalAddressImmediate - Return true if the integer value or GlobalValue
/// can be used as the offset of the target addressing mode.
virtual
bool
isLegalAddressImmediate
(
int64_t
V
)
const
;
/// isLegalAddressImmediate - Return true if the integer value can be used as
/// the offset of the target addressing mode for load / store of the given
/// type.
virtual
bool
isLegalAddressImmediate
(
int64_t
V
,
const
Type
*
Ty
)
const
;
/// isLegalAddressImmediate - Return true if the GlobalValue can be used as
/// the offset of the target addressing mode.
virtual
bool
isLegalAddressImmediate
(
GlobalValue
*
GV
)
const
;
typedef
std
::
vector
<
unsigned
>::
const_iterator
legal_am_scale_iterator
;
legal_am_scale_iterator
legal_am_scale_begin
()
const
{
return
LegalAddressScales
.
begin
();
}
legal_am_scale_iterator
legal_am_scale_end
()
const
{
return
LegalAddressScales
.
end
();
}
/// isLegalAddressScale - Return true if the integer value can be used as the
/// scale of the target addressing mode for load / store of the given type.
virtual
bool
isLegalAddressScale
(
int64_t
S
,
const
Type
*
Ty
)
const
;
//===--------------------------------------------------------------------===//
// Div utility functions
...
...
@@ -906,17 +906,7 @@ public:
return
CmpLibcallCCs
[
Call
];
}
protected
:
/// addLegalAddressScale - Add a integer (> 1) value which can be used as
/// scale in the target addressing mode. Note: the ordering matters so the
/// least efficient ones should be entered first.
void
addLegalAddressScale
(
unsigned
Scale
)
{
LegalAddressScales
.
push_back
(
Scale
);
}
private
:
std
::
vector
<
unsigned
>
LegalAddressScales
;
TargetMachine
&
TM
;
const
TargetData
*
TD
;
...
...
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