[llvm-commits] [llvm-gcc-4.2] r92999 - in /llvm-gcc-4.2/trunk/gcc: llvm-abi.h llvm-convert.cpp
Duncan Sands
baldrick at free.fr
Fri Jan 8 05:20:58 PST 2010
Author: baldrick
Date: Fri Jan 8 07:20:58 2010
New Revision: 92999
URL: http://llvm.org/viewvc/llvm-project?rev=92999&view=rev
Log:
Port dragonegg commit 92909: More unused argument cleaning.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-abi.h
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-abi.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-abi.h?rev=92999&r1=92998&r2=92999&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-abi.h (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-abi.h Fri Jan 8 07:20:58 2010
@@ -103,7 +103,8 @@
/// HandleFCAArgument - This callback is invoked if the aggregate function
/// argument is passed by value as a first class aggregate.
- void HandleFCAArgument(const llvm::Type *LLVMTy, tree type) {}
+ void HandleFCAArgument(const llvm::Type *LLVMTy,
+ tree type ATTRIBUTE_UNUSED) {}
/// EnterField - Called when we're about the enter the field of a struct
/// or union. FieldNo is the number of the element we are entering in the
Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=92999&r1=92998&r2=92999&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Fri Jan 8 07:20:58 2010
@@ -353,7 +353,8 @@
abort();
}
- void HandleFCAArgument(const llvm::Type *LLVMTy, tree type) {
+ void HandleFCAArgument(const llvm::Type *LLVMTy,
+ tree type ATTRIBUTE_UNUSED) {
// Store the FCA argument into alloca.
assert(!LocStack.empty());
Value *Loc = LocStack.back();
@@ -2605,7 +2606,8 @@
/// HandleFCAArgument - This callback is invoked if the aggregate function
/// argument is passed as a first class aggregate.
- void HandleFCAArgument(const llvm::Type *LLVMTy, tree type) {
+ void HandleFCAArgument(const llvm::Type *LLVMTy,
+ tree type ATTRIBUTE_UNUSED) {
Value *Loc = getAddress();
assert(LLVMTy->getPointerTo() == Loc->getType());
CallOperands.push_back(Builder.CreateLoad(Loc));
@@ -4083,7 +4085,7 @@
/// See if operand "exp" can use the indicated Constraint (which is
/// terminated by a null or a comma).
/// Returns: -1=no, 0=yes but auxiliary instructions needed, 1=yes and free
-int MatchWeight(const char *Constraint, tree Operand, bool isInput) {
+static int MatchWeight(const char *Constraint, tree Operand) {
const char *p = Constraint;
int RetVal = 0;
// Look for hard register operand. This matches only a constraint of a
@@ -4169,7 +4171,7 @@
while (*p=='*' || *p=='&' || *p=='%') // skip modifiers
p++;
if (Weights[i] != -1) {
- int w = MatchWeight(p, TREE_VALUE(Output), false);
+ int w = MatchWeight(p, TREE_VALUE(Output));
// Nonmatch means the entire tuple doesn't match. However, we
// keep scanning to set up RunningConstraints correctly for the
// next tuple.
@@ -4192,7 +4194,7 @@
j++, Input = TREE_CHAIN(Input)) {
const char* p = RunningConstraints[j];
if (Weights[i] != -1) {
- int w = MatchWeight(p, TREE_VALUE(Input), true);
+ int w = MatchWeight(p, TREE_VALUE(Input));
if (w < 0)
Weights[i] = -1; // As above.
else
@@ -4258,6 +4260,7 @@
static const char* getConstraintRegNameFromGccTables(const char *RegName,
unsigned int RegNum) {
#ifdef LLVM_DO_NOT_USE_REG_NAMES
+ (void)RegNum;
if (*RegName == '%')
RegName++;
return RegName;
@@ -5968,7 +5971,8 @@
return true;
}
-bool TreeToLLVM::EmitBuiltinBZero(tree exp, Value *&Result) {
+bool TreeToLLVM::EmitBuiltinBZero(tree exp,
+ Value *&Result ATTRIBUTE_UNUSED) {
tree arglist = TREE_OPERAND(exp, 1);
if (!validate_arglist(arglist, POINTER_TYPE, INTEGER_TYPE, VOID_TYPE))
return false;
@@ -6207,7 +6211,8 @@
return true;
}
-bool TreeToLLVM::EmitBuiltinInitDwarfRegSizes(tree exp, Value *&Result) {
+bool TreeToLLVM::EmitBuiltinInitDwarfRegSizes(tree exp,
+ Value *&Result ATTRIBUTE_UNUSED) {
#ifdef DWARF2_UNWIND_INFO
unsigned int i;
bool wrote_return_column = false;
More information about the llvm-commits
mailing list